From f30f5607e33e47ca9a9fca1250a13c02d7bdb931 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 28 Mar 2009 12:47:29 +0000 Subject: (svn r15877) -Codechange: Let drop down lists know about font height. --- src/company_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/company_gui.cpp') diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 1e24420e4..e3036349f 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -480,7 +480,7 @@ public: uint Height(uint width) const { - return 14; + return max(FONT_HEIGHT_NORMAL, (byte)14); } bool Selectable() const @@ -491,7 +491,7 @@ public: void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const { DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + this->result, left + 16, top + 7); - DrawString(left + 32, right - 2, top + 3, this->String(), sel ? TC_WHITE : TC_BLACK); + DrawString(left + 32, right - 2, top + max(0, 13 - FONT_HEIGHT_NORMAL), this->String(), sel ? TC_WHITE : TC_BLACK); } }; -- cgit v1.2.3-54-g00ecf