1
0
Fork 0

Change: [UI] Improve visual padding of vehicle news items. (#13134)

pull/13135/head
Peter Nelson 2024-11-30 15:29:36 +00:00 committed by GitHub
parent 61cbdef92d
commit 568bb1f5da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 6 deletions

View File

@ -200,20 +200,29 @@ static WindowDesc _thin_news_desc(
/* Small news items. */ /* Small news items. */
static constexpr NWidgetPart _nested_small_news_widgets[] = { static constexpr NWidgetPart _nested_small_news_widgets[] = {
/* Caption + close box. The caption is no WWT_CAPTION as the window shall not be moveable and so on. */ /* Caption + close box. The caption is not WWT_CAPTION as the window shall not be moveable and so on. */
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, WID_N_CLOSEBOX), NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, WID_N_CLOSEBOX),
NWidget(WWT_EMPTY, COLOUR_LIGHT_BLUE, WID_N_CAPTION), SetFill(1, 0), NWidget(WWT_EMPTY, COLOUR_LIGHT_BLUE, WID_N_CAPTION),
NWidget(WWT_TEXTBTN, COLOUR_LIGHT_BLUE, WID_N_SHOW_GROUP), SetAspect(WidgetDimensions::ASPECT_VEHICLE_ICON), SetResize(1, 0), NWidget(WWT_TEXTBTN, COLOUR_LIGHT_BLUE, WID_N_SHOW_GROUP),
SetAspect(WidgetDimensions::ASPECT_VEHICLE_ICON),
SetResize(1, 0),
SetDataTip(STR_NULL /* filled in later */, STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP), SetDataTip(STR_NULL /* filled in later */, STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP),
EndContainer(), EndContainer(),
/* Main part */ /* Main part */
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, WID_N_HEADLINE), 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_VERTICAL),
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_N_VIEWPORT), SetMinimalSize(274, 47), SetFill(1, 0), SetPIP(0, WidgetDimensions::unscaled.vsep_normal, 0),
SetPadding(2),
NWidget(WWT_INSET, COLOUR_LIGHT_BLUE, WID_N_INSET),
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_N_VIEWPORT),
SetMinimalSize(274, 47),
EndContainer(),
NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MESSAGE),
SetMinimalTextLines(2, 0),
SetMinimalSize(275, 0),
EndContainer(), EndContainer(),
NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MESSAGE), SetMinimalSize(275, 20), SetFill(1, 0), SetPadding(0, 5, 0, 5),
EndContainer(), EndContainer(),
}; };