Changeset - r22134:cf5c572ba0df
[Not reviewed]
master
0 1 0
frosch - 9 years ago 2015-06-20 12:57:34
frosch@openttd.org
(svn r27307) -Fix [FS#6259]: Error message window with manager face failed with GUI zoom. (Johnnei)
1 file changed with 11 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/error_gui.cpp
Show inline comments
 
@@ -182,8 +182,8 @@ public:
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != WID_EM_MESSAGE) return;
 

	
 
		switch (widget) {
 
			case WID_EM_MESSAGE: {
 
		CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
 
		if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
 

	
 
@@ -197,6 +197,15 @@ public:
 
		if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
 

	
 
		size->height = max(size->height, panel_height);
 
				break;
 
			}
 
			case WID_EM_FACE: {
 
				Dimension face_size = GetSpriteSize(SPR_GRADIENT);
 
				size->width = max(size->width, face_size.width);
 
				size->height = max(size->height, face_size.height);
 
				break;
 
			}
 
		}
 
	}
 

	
 
	virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
0 comments (0 inline, 0 general)