summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-04-17 18:43:17 +0000
committerterkhen <terkhen@openttd.org>2011-04-17 18:43:17 +0000
commit0bd44f60e95e8f54d749132520bd2f3044e2efb7 (patch)
tree9cf8291e40270f5105c4245cb28014ed2dbbad5f /src
parent10caf391a1b6de33e1ac03236b2744adc9a2b2c5 (diff)
downloadopenttd-0bd44f60e95e8f54d749132520bd2f3044e2efb7.tar.xz
(svn r22344) -Codechange: Remove width constant from the sign list window.
Diffstat (limited to 'src')
-rw-r--r--src/signs_gui.cpp6
-rw-r--r--src/signs_type.h3
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 */