diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-04-05 18:43:12 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-04-30 17:08:15 +0100 |
commit | 4791ff28627eabe6322352428dc1b42344f545b9 (patch) | |
tree | 4bd1a641a0f905f8ddc3a247fd5df73706d089f2 /src/network/network_gui.cpp | |
parent | 6fe5353da2a0d3d60f8375b28536213e67cd869c (diff) | |
download | openttd-4791ff28627eabe6322352428dc1b42344f545b9.tar.xz |
Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
Diffstat (limited to 'src/network/network_gui.cpp')
-rw-r--r-- | src/network/network_gui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 590f2f5e0..b2feacc95 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -98,7 +98,9 @@ public: this->Add(new NWidgetLeaf(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_YEARS, STR_NETWORK_SERVER_LIST_YEARS_CAPTION, STR_NETWORK_SERVER_LIST_YEARS_CAPTION_TOOLTIP)); leaf = new NWidgetLeaf(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_INFO, STR_EMPTY, STR_NETWORK_SERVER_LIST_INFO_ICONS_TOOLTIP); - leaf->SetMinimalSize(14 + GetSpriteSize(SPR_LOCK).width + GetSpriteSize(SPR_BLOT).width + GetSpriteSize(SPR_FLAGS_BASE).width, 12); + leaf->SetMinimalSize(14 + GetSpriteSize(SPR_LOCK, nullptr, ZOOM_LVL_OUT_4X).width + + GetSpriteSize(SPR_BLOT, nullptr, ZOOM_LVL_OUT_4X).width + + GetSpriteSize(SPR_FLAGS_BASE, nullptr, ZOOM_LVL_OUT_4X).width, 12); leaf->SetFill(0, 1); this->Add(leaf); |