diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-04-23 21:22:15 +0200 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-04-24 23:04:55 +0200 |
commit | 62dec9f174aaf003a114a55600bc4f201d2841b9 (patch) | |
tree | 0f36a6e9ade62418e2f285077b8f9537d98b7885 | |
parent | dd35a437039b48c384057e1d3cac18681497f58e (diff) | |
download | openttd-62dec9f174aaf003a114a55600bc4f201d2841b9.tar.xz |
Fix: Scale all min size and padding by UI scale
-rw-r--r-- | src/widget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index dcdf75c17..71c874a52 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -2634,7 +2634,7 @@ static int MakeNWidget(const NWidgetPart *parts, int count, NWidgetBase **dest, NWidgetResizeBase *nwrb = dynamic_cast<NWidgetResizeBase *>(*dest); if (nwrb != nullptr) { assert(parts->u.xy.x >= 0 && parts->u.xy.y >= 0); - nwrb->SetMinimalSize(parts->u.xy.x, parts->u.xy.y); + nwrb->SetMinimalSize(ScaleGUITrad(parts->u.xy.x), ScaleGUITrad(parts->u.xy.y)); } break; } @@ -2664,7 +2664,7 @@ static int MakeNWidget(const NWidgetPart *parts, int count, NWidgetBase **dest, } case WPT_PADDING: - if (*dest != nullptr) (*dest)->SetPadding(parts->u.padding.top, parts->u.padding.right, parts->u.padding.bottom, parts->u.padding.left); + if (*dest != nullptr) (*dest)->SetPadding(ScaleGUITrad(parts->u.padding.top), ScaleGUITrad(parts->u.padding.right), ScaleGUITrad(parts->u.padding.bottom), ScaleGUITrad(parts->u.padding.left)); break; case WPT_PIPSPACE: { |