From 61576c3184e47b34f8ce126aee10a812b1313e81 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 7 Nov 2009 10:26:09 +0000 Subject: [PATCH] (svn r17991) -Codechange: Use WD_VSCROLLBAR_WIDTH constant in dropdown menu window. --- src/widgets/dropdown.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 12e4602216..5a484f9a85 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -343,7 +343,7 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u 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 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u * 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);