From a016e3fbf9ecc1bfb425e77be183097fd5f5de93 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Fri, 19 Jun 2015 21:33:42 +0300 Subject: [PATCH] Fixed refit window too big. --- src/vehicle_gui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index c6f6e345c2..c13682ae0b 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -661,7 +661,7 @@ struct RefitWindow : public Window { switch (widget) { case WID_VR_MATRIX: resize->height = GetMinSizing(NWST_STEP, WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM); - size->height = resize->height * 6; + size->height = resize->height * 5; break; case WID_VR_VEHICLE_PANEL_DISPLAY: @@ -670,6 +670,7 @@ struct RefitWindow : public Window { case WID_VR_INFO: size->width = WD_FRAMERECT_LEFT + this->information_width + WD_FRAMERECT_RIGHT; + size->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL); break; } } @@ -797,7 +798,8 @@ struct RefitWindow : public Window { StringID string = this->GetCapacityString(this->cargo); if (string != INVALID_STRING_ID) { DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, - r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM, string); + r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM, string, + TC_FROMSTRING, SA_VERT_CENTER | SA_LEFT); } } break;