Changeset - r25191:ecc28a6f333e
[Not reviewed]
master
0 1 0
Peter Nelson - 4 years ago 2021-04-17 20:08:47
peter1138@openttd.org
Fix #9042: Make multiplayer server list height auto-fill window.

#9042 did not fix all combinations of scaling options. This additional
change makes the server list automatically fill available height.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/network/network_gui.cpp
Show inline comments
 
@@ -497,12 +497,13 @@ public:
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NG_MATRIX:
 
				resize->height = WD_MATRIX_TOP + std::max(GetSpriteSize(SPR_BLOT).height, (uint)FONT_HEIGHT_NORMAL) + WD_MATRIX_BOTTOM;
 
				fill->height = resize->height;
 
				size->height = 12 * resize->height;
 
				break;
 

	
 
			case WID_NG_LASTJOINED:
 
				size->height = WD_MATRIX_TOP + std::max(GetSpriteSize(SPR_BLOT).height, (uint)FONT_HEIGHT_NORMAL) + WD_MATRIX_BOTTOM;
 
				break;
0 comments (0 inline, 0 general)