summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorPeterN <peter1138@openttd.org>2021-05-08 21:01:16 +0100
committerGitHub <noreply@github.com>2021-05-08 21:01:16 +0100
commit330a305c99766b2e62541a8956a00b2cbe7bbbe1 (patch)
tree1f95cc246dcbcd7b93466eec91100594a80dd15e /src/industry_gui.cpp
parentb9ab3bd6b3f28b682bf5e155bf35d7cbb8b8224a (diff)
downloadopenttd-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/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 147d4dc77..4e6c61ee2 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -1186,7 +1186,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = {
EndContainer(),
NWidget(WWT_PANEL, COLOUR_CREAM),
NWidget(WWT_INSET, COLOUR_CREAM), SetPadding(2, 2, 2, 2),
- NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_IV_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 0), SetPadding(1, 1, 1, 1), SetResize(1, 1),
+ NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_IV_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 0), SetResize(1, 1),
EndContainer(),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_CREAM, WID_IV_INFO), SetMinimalSize(260, 2), SetResize(1, 0),