forked from mirror/OpenTTD
Change: Improve news window layouts.
* Use appropriate container widget nesting with padding, instead of single-sided padding. * Use layer widget to allow main news message to overlay close box and date widgets, to more closely match the old fixed-pixel layout.
This commit is contained in:
@@ -1230,6 +1230,17 @@ constexpr NWidgetPart SetPadding(uint8_t top, uint8_t right, uint8_t bottom, uin
|
||||
return NWidgetPart{WPT_PADDING, NWidgetPartPaddings{left, top, right, bottom}};
|
||||
}
|
||||
|
||||
/**
|
||||
* Widget part function for setting additional space around a widget.
|
||||
* @param horizontal The padding on either side of the widget.
|
||||
* @param vertical The padding above and below the widget.
|
||||
* @ingroup NestedWidgetParts
|
||||
*/
|
||||
constexpr NWidgetPart SetPadding(uint8_t horizontal, uint8_t vertical)
|
||||
{
|
||||
return NWidgetPart{WPT_PADDING, NWidgetPartPaddings{horizontal, vertical, horizontal, vertical}};
|
||||
}
|
||||
|
||||
/**
|
||||
* Widget part function for setting additional space around a widget.
|
||||
* @param r The padding around the widget.
|
||||
|
Reference in New Issue
Block a user