summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2011-10-11 08:07:47 +0000
committerpeter1138 <peter1138@openttd.org>2011-10-11 08:07:47 +0000
commit50d15412705fa8ffb37e53afd798595e74073f0d (patch)
treeadd2c1787d5cc71bb594b03912c5a1e078354b2b /src/widgets
parent719f6618d773a5ad848920949b0470122080ac37 (diff)
downloadopenttd-50d15412705fa8ffb37e53afd798595e74073f0d.tar.xz
(svn r23017) -Codechange: Add support for resized scrollbars.
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 3949cdbfb..56654e6be 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -137,7 +137,7 @@ struct DropdownWindow : Window {
this->vscroll = this->GetScrollbar(DDM_SCROLL);
- uint items_width = size.width - (scroll ? WD_VSCROLLBAR_WIDTH : 0);
+ uint items_width = size.width - (scroll ? NWidgetScrollbar::GetVerticalDimension().width : 0);
NWidgetCore *nwi = this->GetWidget<NWidgetCore>(DDM_ITEMS);
nwi->SetMinimalSize(items_width, size.height + 4);
nwi->colour = wi_colour;
@@ -414,7 +414,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 += WD_VSCROLLBAR_WIDTH;
+ max_item_width += NWidgetScrollbar::GetVerticalDimension().width;
}
}