Changeset - r8884:0f3a789fa3d6
[Not reviewed]
master
0 1 0
peter1138 - 16 years ago 2008-04-10 11:59:18
peter1138@openttd.org
(svn r12651) -Fix (r12644) [FS#1915]: Dropdown widget width should be one pixel less than window width, not one more.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/widgets/dropdown.cpp
Show inline comments
 
@@ -249,25 +249,25 @@ void ShowDropDownList(Window *w, DropDow
 
	if (width == 0) width = wi->right - wi->left + 1;
 

	
 
	Window *dw = AllocateWindow(
 
		w->left + wi->left,
 
		top,
 
		width,
 
		height,
 
		DropDownMenuWndProc,
 
		WC_DROPDOWN_MENU,
 
		_dropdown_menu_widgets);
 

	
 
	dw->widget[0].color = wi->color;
 
	dw->widget[0].right = width + 1;
 
	dw->widget[0].right = width - 1;
 
	dw->widget[0].bottom = height - 1;
 

	
 
	dw->SetWidgetHiddenState(1, !scroll);
 

	
 
	if (scroll) {
 
		/* We're scrolling, so enable the scroll bar and shrink the list by
 
		 * the scrollbar's width */
 
		dw->widget[1].color  = wi->color;
 
		dw->widget[1].right  = dw->widget[0].right;
 
		dw->widget[1].left   = dw->widget[1].right - 11;
 
		dw->widget[1].bottom = height - 1;
 
		dw->widget[0].right -= 12;
0 comments (0 inline, 0 general)