diff options
author | frosch <frosch@openttd.org> | 2013-10-13 19:18:30 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-10-13 19:18:30 +0000 |
commit | 12ddbb7cb11ddeba47a6bed8d36bef6432aa3236 (patch) | |
tree | ec386d7d837736fbff2d859be90eb5686b4a5e46 /src/settings_gui.cpp | |
parent | d9717c0b017a9783bab4793ac367a8a5d12bef5d (diff) | |
download | openttd-12ddbb7cb11ddeba47a6bed8d36bef6432aa3236.tar.xz |
(svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index efd958095..abeb78a31 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -393,11 +393,10 @@ struct GameOptionsWindow : Window { if (list != NULL) { /* Find the biggest item for the default size. */ for (DropDownList::iterator it = list->begin(); it != list->end(); it++) { - static const Dimension extra = {WD_DROPDOWNTEXT_LEFT + WD_DROPDOWNTEXT_RIGHT, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM}; Dimension string_dim; int width = (*it)->Width(); - string_dim.width = width + extra.width; - string_dim.height = (*it)->Height(width) + extra.height; + string_dim.width = width + padding.width; + string_dim.height = (*it)->Height(width) + padding.height; *size = maxdim(*size, string_dim); delete *it; } |