Fix: Apply unscaled padding to Viewport inside WWT_INSET. (#9219)
Since pixel dimensions in SetPadding() are scaled by GUI size, padding for inset viewports was excessive. Instead, automatically apply padding for WWT_INSET at widget level. This applies to all widgets inside a WWT_INSET, which in all instances is a NWID_VIEWPORT.
This commit is contained in:
@@ -2485,7 +2485,7 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(WWT_INSET, COLOUR_GREY), SetPadding(2, 2, 2, 2),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_VV_VIEWPORT), SetMinimalSize(226, 84), SetResize(1, 1), SetPadding(1, 1, 1, 1),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_VV_VIEWPORT), SetMinimalSize(226, 84), SetResize(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
|
Reference in New Issue
Block a user