diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/signs_gui.cpp | 6 | ||||
-rw-r--r-- | src/signs_type.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 9f104a8b1..ca65a8c94 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -289,8 +289,8 @@ struct SignListWindow : QueryStringBaseWindow, SignList { case SLW_LIST: { Dimension spr_dim = GetSpriteSize(SPR_COMPANY_ICON); this->text_offset = WD_FRAMETEXT_LEFT + spr_dim.width + 2; // 2 pixels space between icon and the sign text. - resize->height = max<uint>(FONT_HEIGHT_NORMAL, GetSpriteSize(SPR_COMPANY_ICON).height); - Dimension d = {this->text_offset + MAX_LENGTH_SIGN_NAME_PIXELS + WD_FRAMETEXT_RIGHT, WD_FRAMERECT_TOP + 5 * resize->height + WD_FRAMERECT_BOTTOM}; + resize->height = max<uint>(FONT_HEIGHT_NORMAL, spr_dim.height); + Dimension d = {this->text_offset + WD_FRAMETEXT_RIGHT, WD_FRAMERECT_TOP + 5 * resize->height + WD_FRAMERECT_BOTTOM}; *size = maxdim(*size, d); break; } @@ -403,7 +403,7 @@ static const NWidgetPart _nested_sign_list_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(NWID_VERTICAL), - NWidget(WWT_PANEL, COLOUR_GREY, SLW_LIST), SetMinimalSize(WD_FRAMETEXT_LEFT + 16 + MAX_LENGTH_SIGN_NAME_PIXELS + WD_FRAMETEXT_RIGHT, 50), + NWidget(WWT_PANEL, COLOUR_GREY, SLW_LIST), SetMinimalSize(WD_FRAMETEXT_LEFT + 16 + 255 + WD_FRAMETEXT_RIGHT, 50), SetResize(1, 10), SetFill(1, 0), SetScrollbar(SLW_SCROLLBAR), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), diff --git a/src/signs_type.h b/src/signs_type.h index 361059e05..cbe3752cc 100644 --- a/src/signs_type.h +++ b/src/signs_type.h @@ -17,7 +17,6 @@ struct Sign; static const SignID INVALID_SIGN = 0xFFFF; -static const uint MAX_LENGTH_SIGN_NAME_CHARS = 32; ///< The maximum length of a sign name in characters including '\0' -static const uint MAX_LENGTH_SIGN_NAME_PIXELS = 255; ///< The maximum length of a sign name in pixels +static const uint MAX_LENGTH_SIGN_NAME_CHARS = 32; ///< The maximum length of a sign name in characters including '\0' #endif /* SIGNS_TYPE_H */ |