summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-16 08:33:28 +0000
committerfrosch <frosch@openttd.org>2010-08-16 08:33:28 +0000
commit65b43667fa40e39c3739d9b9c37a6e4a6f7c4fc9 (patch)
treeb9c99ebf9b115b402769d416c23a6b45f7b984e8 /src
parent1c3d42598e1de68e109ee27dd289885aabe9878b (diff)
downloadopenttd-65b43667fa40e39c3739d9b9c37a6e4a6f7c4fc9.tar.xz
(svn r20511) -Fix: Initial height of townlist was not a multiple of the line height.
Diffstat (limited to 'src')
-rw-r--r--src/town_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index ba6f10928..badaca253 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -631,7 +631,7 @@ static const NWidgetPart _nested_town_directory_widgets[] = {
NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TDW_SORTNAME), SetMinimalSize(99, 12), SetDataTip(STR_SORT_BY_CAPTION_NAME, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TDW_SORTPOPULATION), SetMinimalSize(97, 12), SetDataTip(STR_SORT_BY_CAPTION_POPULATION, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0),
EndContainer(),
- NWidget(WWT_PANEL, COLOUR_BROWN, TDW_CENTERTOWN), SetMinimalSize(196, 164), SetDataTip(0x0, STR_TOWN_DIRECTORY_LIST_TOOLTIP),
+ NWidget(WWT_PANEL, COLOUR_BROWN, TDW_CENTERTOWN), SetMinimalSize(196, 0), SetDataTip(0x0, STR_TOWN_DIRECTORY_LIST_TOOLTIP),
SetFill(1, 0), SetResize(0, 10), SetScrollbar(TDW_SCROLLBAR), EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN, TDW_BOTTOM_PANEL),
NWidget(WWT_TEXT, COLOUR_BROWN, TDW_BOTTOM_TEXT), SetPadding(2, 0, 0, 2), SetMinimalSize(196, 12), SetFill(1, 0), SetDataTip(STR_TOWN_POPULATION, STR_NULL),
@@ -794,10 +794,11 @@ public:
SetDParam(1, 10000000); // 10^7
d = maxdim(d, GetStringBoundingBox(STR_TOWN_DIRECTORY_TOWN));
}
+ resize->height = d.height;
+ d.height *= 5;
d.width += padding.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
- d.height += padding.height;
+ d.height += padding.height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
*size = maxdim(*size, d);
- resize->height = d.height;
break;
}
case TDW_BOTTOM_TEXT: {