Changeset - r14087:7876a5df2f92
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2009-12-27 13:19:17
rubidium@openttd.org
(svn r18644) -Fix [FS#3434]: company league window was too narrow
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/graph_gui.cpp
Show inline comments
 
@@ -1091,25 +1091,25 @@ public:
 
		for (uint i = 0; i < lengthof(_performance_titles); i++) {
 
			uint width = GetStringBoundingBox(_performance_titles[i]).width;
 
			if (width > widest_width) {
 
				widest_title = i;
 
				widest_width = width;
 
			}
 
		}
 

	
 
		const Company *c;
 
		FOR_ALL_COMPANIES(c) {
 
			SetDParam(0, c->index);
 
			SetDParam(1, c->index);
 
			SetDParam(2, widest_title);
 
			SetDParam(2, _performance_titles[widest_title]);
 
			widest_width = max(widest_width, GetStringBoundingBox(STR_COMPANY_LEAGUE_COMPANY_NAME).width);
 
		}
 

	
 
		this->text_width = widest_width + 30; // Keep some extra spacing
 

	
 
		size->width = WD_FRAMERECT_LEFT + this->ordinal_width + WD_FRAMERECT_RIGHT + 16 + WD_FRAMERECT_LEFT + this->text_width + WD_FRAMERECT_RIGHT;
 
	}
 

	
 

	
 
	virtual void OnTick()
 
	{
 
		if (this->companies.NeedResort()) {
0 comments (0 inline, 0 general)