summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-22 13:01:07 +0000
committerrubidium <rubidium@openttd.org>2009-11-22 13:01:07 +0000
commita95655b7c80848a6d2b1b7ce095df7794c2e93ef (patch)
tree76a1dcb5cf5faf28d4370350c10241e0146ca7bb
parent88e80d4c7635201850d67e46376d3fac997deb8d (diff)
downloadopenttd-a95655b7c80848a6d2b1b7ce095df7794c2e93ef.tar.xz
(svn r18217) -Codechange: make the livery window big font aware
-rw-r--r--src/company_gui.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 1f3aaacc5..0100e2ec1 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -624,8 +624,16 @@ public:
break;
case SCLW_WIDGET_SEC_COL_DROPDOWN:
- if (!_loaded_newgrf_features.has_2CC) size->width = 0;
- break;
+ if (!_loaded_newgrf_features.has_2CC) {
+ size->width = 0;
+ break;
+ }
+ /* Fall through */
+ case SCLW_WIDGET_PRI_COL_DROPDOWN: {
+ for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) {
+ size->width = max(size->width, GetStringBoundingBox(*id).width + 34);
+ }
+ } break;
}
}