Merge branch 'master' into 1.5
Conflicts: src/ai/ai_gui.cpp src/build_vehicle_gui.cpp src/cheat_gui.cpp src/company_gui.cpp src/depot_gui.cpp src/dock_gui.cpp src/genworld_gui.cpp src/misc_gui.cpp src/network/network_content_gui.cpp src/network/network_gui.cpp src/newgrf_gui.cpp src/news_gui.cpp src/rail_gui.cpp src/road_gui.cpp src/settings_gui.cpp src/settings_gui.h src/station_gui.cpp src/table/settings.ini src/toolbar_gui.cpp src/toolbar_gui.h src/vehicle_gui.cpp src/video/sdl_v.cpp src/widget.cpp src/widgets/settings_widget.h
This commit is contained in:
+5
-4
@@ -165,7 +165,7 @@ static const NWidgetPart _nested_thin_news_widgets[] = {
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MESSAGE), SetMinimalSize(428, 48), SetFill(1, 0), SetPadding(0, 5, 0, 5),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_N_VIEWPORT), SetMinimalSize(426, 70), SetPadding(1, 2, 2, 2),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_N_VIEWPORT), SetSizingType(NWST_VIEWPORT), SetMinimalSize(426, 70), SetPadding(1, 2, 2, 2),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ static const NWidgetPart _nested_small_news_widgets[] = {
|
||||
/* Main part */
|
||||
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, WID_N_HEADLINE),
|
||||
NWidget(WWT_INSET, COLOUR_LIGHT_BLUE, WID_N_INSET), SetPadding(2, 2, 2, 2),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_N_VIEWPORT), SetPadding(1, 1, 1, 1), SetMinimalSize(274, 47), SetFill(1, 0),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_N_VIEWPORT), SetSizingType(NWST_VIEWPORT), SetPadding(1, 1, 1, 1), SetMinimalSize(274, 47), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MESSAGE), SetMinimalSize(275, 20), SetFill(1, 0), SetPadding(0, 5, 0, 5),
|
||||
EndContainer(),
|
||||
@@ -318,6 +318,7 @@ struct NewsWindow : Window {
|
||||
break;
|
||||
|
||||
case WID_N_MESSAGE:
|
||||
size->width = GetMinSizing(NWST_WINDOW_LENGTH, size->width);
|
||||
CopyInDParam(0, this->ni->params, lengthof(this->ni->params));
|
||||
str = this->ni->string_id;
|
||||
break;
|
||||
@@ -1010,7 +1011,7 @@ struct MessageHistoryWindow : Window {
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
||||
{
|
||||
if (widget == WID_MH_BACKGROUND) {
|
||||
this->line_height = FONT_HEIGHT_NORMAL + 2;
|
||||
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + 2);
|
||||
resize->height = this->line_height;
|
||||
|
||||
/* Months are off-by-one, so it's actually 8. Not using
|
||||
@@ -1041,7 +1042,7 @@ struct MessageHistoryWindow : Window {
|
||||
}
|
||||
|
||||
/* Fill the widget with news items. */
|
||||
int y = r.top + this->top_spacing;
|
||||
int y = Center(r.top + this->top_spacing, this->line_height, FONT_HEIGHT_NORMAL);
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
uint date_left = rtl ? r.right - WD_FRAMERECT_RIGHT - this->date_width : r.left + WD_FRAMERECT_LEFT;
|
||||
uint date_right = rtl ? r.right - WD_FRAMERECT_RIGHT : r.left + WD_FRAMERECT_LEFT + this->date_width;
|
||||
|
||||
Reference in New Issue
Block a user