Add a min sizing for width of command errors, news and query windows.

This commit is contained in:
Juanjo
2013-08-09 08:34:39 +00:00
committed by pelya
parent d0c26fac56
commit 97e285fee5
7 changed files with 116 additions and 14 deletions

View File

@@ -185,6 +185,7 @@ public:
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);
size->width = GetMinSizing(NWST_WINDOW_LENGTH, size->width);
int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
this->height_summary = GetStringHeight(this->summary_msg, text_width);
this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);