Mercurial > hg > openttd
changeset 13879:1501e8e0b705 draft
(svn r18408) -Fix (r17954): After computing the needed width for the client list, also use it.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 05 Dec 2009 13:53:58 +0000 |
parents | 2e31d7cf0578 |
children | bde850c86447 |
files | src/network/network_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -2030,13 +2030,13 @@ this->server_client_width = max(GetStringBoundingBox(STR_NETWORK_SERVER).width, GetStringBoundingBox(STR_NETWORK_CLIENT).width) + WD_FRAMERECT_RIGHT; this->company_icon_width = GetSpriteSize(SPR_COMPANY_ICON).width + WD_FRAMERECT_LEFT; - uint width = 200; // Default width + uint width = 100; // Default width const NetworkClientInfo *ci; FOR_ALL_CLIENT_INFOS(ci) { width = max(width, GetStringBoundingBox(ci->client_name).width); } - size->width = WD_FRAMERECT_LEFT + this->server_client_width + this->company_icon_width + WD_FRAMERECT_RIGHT; + size->width = WD_FRAMERECT_LEFT + this->server_client_width + this->company_icon_width + width + WD_FRAMERECT_RIGHT; } virtual void OnPaint()