summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2021-04-15 23:58:49 +0100
committerMichael Lutz <michi@icosahedron.de>2021-04-16 20:24:08 +0200
commit837994034d1836e30658b9e38d5ce1b2df1e2846 (patch)
tree5694461ea18f9e8fbf89d42894e71432219cd6fa /src/network
parenta4db7c844d761a68b19ad88c9bfee8fcf5dc71b5 (diff)
downloadopenttd-837994034d1836e30658b9e38d5ce1b2df1e2846.tar.xz
Fix: Sizing of Multiplayer server list incorrect when GUI zoom doesn't match Font zoom.
The server information panel was scaled by GUI scale, which could result in a panel that is longer than the server list. This height difference is then maintained when the window is resized to fill the screen. Instead, specify the minimum size by number of text lines and (summed total) padding.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index ae263cf00..c1f11e84e 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -954,7 +954,7 @@ static const NWidgetPart _nested_network_game_widgets[] = {
EndContainer(),
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, WID_NG_DETAILS),
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(5, 5, 5),
- NWidget(WWT_EMPTY, INVALID_COLOUR, WID_NG_DETAILS_SPACER), SetMinimalSize(140, 155), SetResize(0, 1), SetFill(1, 1), // Make sure it's at least this wide
+ NWidget(WWT_EMPTY, INVALID_COLOUR, WID_NG_DETAILS_SPACER), SetMinimalSize(140, 0), SetMinimalTextLines(15, 24 + WD_PAR_VSEP_NORMAL), SetResize(0, 1), SetFill(1, 1), // Make sure it's at least this wide
NWidget(NWID_HORIZONTAL, NC_NONE), SetPIP(5, 5, 5),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_NG_NEWGRF_MISSING_SEL),
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_NEWGRF_MISSING), SetFill(1, 0), SetDataTip(STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_BUTTON, STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_TOOLTIP),