diff options
author | alberth <alberth@openttd.org> | 2009-11-07 10:26:09 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-11-07 10:26:09 +0000 |
commit | 61576c3184e47b34f8ce126aee10a812b1313e81 (patch) | |
tree | 1d5962e7594230e72d5b662a449dd142901a00de /src/widgets | |
parent | 7dd10a684ddd562fe4a0929a6fa0c89114212be7 (diff) | |
download | openttd-61576c3184e47b34f8ce126aee10a812b1313e81.tar.xz |
(svn r17991) -Codechange: Use WD_VSCROLLBAR_WIDTH constant in dropdown menu window.
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dropdown.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 12e460221..5a484f9a8 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); |