(svn r18225) -Codechange: make the select station window behave better with big fonts

This commit is contained in:
rubidium 2009-11-22 14:46:14 +00:00
parent 81087052dc
commit c99d15bf74

View File

@ -1265,7 +1265,7 @@ static const NWidgetPart _nested_select_station_widgets[] = {
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, JSW_WIDGET_CAPTION), SetDataTip(STR_JOIN_STATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, JSW_WIDGET_CAPTION), SetDataTip(STR_JOIN_STATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, JSW_PANEL), SetMinimalSize(188, 66), SetResize(1, 10), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, JSW_PANEL), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL), NWidget(NWID_VERTICAL),
NWidget(WWT_SCROLLBAR, COLOUR_DARK_GREEN, JSW_SCROLLBAR), NWidget(WWT_SCROLLBAR, COLOUR_DARK_GREEN, JSW_SCROLLBAR),
NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN, JSW_RESIZEBOX), NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN, JSW_RESIZEBOX),
@ -1307,9 +1307,10 @@ struct SelectStationWindow : Window {
} }
resize->height = d.height; resize->height = d.height;
d.height *= 5;
d.width += WD_FRAMERECT_RIGHT + WD_FRAMERECT_LEFT; d.width += WD_FRAMERECT_RIGHT + WD_FRAMERECT_LEFT;
d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
*size = maxdim(*size, d); *size = d;
} }
virtual void OnPaint() virtual void OnPaint()