From 90b7f0f3cb6e42e62a445e43407e4c543f55306f Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 20 Dec 2009 16:42:35 +0000 Subject: (svn r18575) -Fix [FS#3393]: unit numbers weren't always fully shown in the depot --- src/depot_gui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/depot_gui.cpp') diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 7c265489e..c053fffc4 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -631,15 +631,14 @@ struct DepotWindow : Window { this->count_width = 0; } - SetDParam(0, 999); - Dimension unumber = GetStringBoundingBox(STR_BLACK_COMMA); + Dimension unumber = { GetDigitWidth() * 4, FONT_HEIGHT_NORMAL }; const Sprite *spr = GetSprite(SPR_FLAG_VEH_STOPPED, ST_NORMAL); this->flag_width = spr->width + WD_FRAMERECT_RIGHT; this->flag_height = spr->height; if (this->type == VEH_TRAIN || this->type == VEH_ROAD) { min_height = max(unumber.height + WD_MATRIX_TOP, spr->height); - this->header_width = unumber.width + this->flag_width; + this->header_width = unumber.width + this->flag_width + WD_FRAMERECT_LEFT; } else { min_height = unumber.height + spr->height + WD_MATRIX_TOP + WD_PAR_VSEP_NORMAL + WD_MATRIX_BOTTOM; this->header_width = max(unumber.width, this->flag_width) + WD_FRAMERECT_RIGHT; -- cgit v1.2.3-70-g09d2