# HG changeset patch # User rubidium # Date 2009-11-22 13:01:07 # Node ID 2cd8c1ab25155603b1848245a5b2b80d47f7d7e4 # Parent 897b809ad01273f0b5d2bdbed84397e05005a796 (svn r18217) -Codechange: make the livery window big font aware diff --git a/src/company_gui.cpp b/src/company_gui.cpp --- 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; } }