diff options
author | PeterN <peter1138@openttd.org> | 2021-05-08 21:01:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-08 21:01:16 +0100 |
commit | 330a305c99766b2e62541a8956a00b2cbe7bbbe1 (patch) | |
tree | 1f95cc246dcbcd7b93466eec91100594a80dd15e /src/vehicle_gui.cpp | |
parent | b9ab3bd6b3f28b682bf5e155bf35d7cbb8b8224a (diff) | |
download | openttd-330a305c99766b2e62541a8956a00b2cbe7bbbe1.tar.xz |
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.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index c6f2ee52a..006664491 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -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), |