summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2021-03-09 09:43:04 +0000
committerGitHub <noreply@github.com>2021-03-09 10:43:04 +0100
commit9fdc8810053e695ad1220ff1d22cc3df984156c6 (patch)
tree35cf453931b4fecfa53bab5a17bd312f83a57aa6 /src
parent0464a50ab8f5f6c7028da80cb0d579cdfc84717a (diff)
downloadopenttd-9fdc8810053e695ad1220ff1d22cc3df984156c6.tar.xz
Fix: Scale PIP-padding the same as regular padding. (#8829)
Diffstat (limited to 'src')
-rw-r--r--src/widget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index d1ba44679..823169108 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -2676,10 +2676,10 @@ static int MakeNWidget(const NWidgetPart *parts, int count, NWidgetBase **dest,
case WPT_PIPSPACE: {
NWidgetPIPContainer *nwc = dynamic_cast<NWidgetPIPContainer *>(*dest);
- if (nwc != nullptr) nwc->SetPIP(parts->u.pip.pre, parts->u.pip.inter, parts->u.pip.post);
+ if (nwc != nullptr) nwc->SetPIP(ScaleGUITrad(parts->u.pip.pre), ScaleGUITrad(parts->u.pip.inter), ScaleGUITrad(parts->u.pip.post));
NWidgetBackground *nwb = dynamic_cast<NWidgetBackground *>(*dest);
- if (nwb != nullptr) nwb->SetPIP(parts->u.pip.pre, parts->u.pip.inter, parts->u.pip.post);
+ if (nwb != nullptr) nwb->SetPIP(ScaleGUITrad(parts->u.pip.pre), ScaleGUITrad(parts->u.pip.inter), ScaleGUITrad(parts->u.pip.post));
break;
}