changeset 13473:551172a4ca0d draft

(svn r17991) -Codechange: Use WD_VSCROLLBAR_WIDTH constant in dropdown menu window.
author alberth <alberth@openttd.org>
date Sat, 07 Nov 2009 10:26:09 +0000
parents d6f77d2130aa
children 2092ae12b3cf
files src/widgets/dropdown.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -343,7 +343,7 @@
 			scroll = true;
 			/* Add space for the scroll bar if we automatically determined
 			 * the width of the list. */
-			max_item_width += 12;
+			max_item_width += WD_VSCROLLBAR_WIDTH;
 		}
 	}
 
@@ -364,9 +364,9 @@
 		 * the scrollbar's width */
 		dw->widget[DDM_SCROLL].colour = wi_colour;
 		dw->widget[DDM_SCROLL].right  = dw->widget[DDM_ITEMS].right;
-		dw->widget[DDM_SCROLL].left   = dw->widget[DDM_SCROLL].right - 11;
+		dw->widget[DDM_SCROLL].left   = dw->widget[DDM_SCROLL].right - (WD_VSCROLLBAR_WIDTH - 1);
 		dw->widget[DDM_SCROLL].bottom = dw->widget[DDM_ITEMS].bottom;
-		dw->widget[DDM_ITEMS].right -= 12;
+		dw->widget[DDM_ITEMS].right -= WD_VSCROLLBAR_WIDTH;
 
 		/* Capacity is the average number of items visible */
 		dw->vscroll.SetCapacity(height * (uint16)list->size() / list_height);