(svn r27838) -Fix: Small news window's fake caption (r19943) was not sized to fit its text.

pull/16/head
peter1138 7 years ago
parent 60d4d1db3f
commit f17d38598a

@ -313,6 +313,15 @@ struct NewsWindow : Window {
{
StringID str = STR_NULL;
switch (widget) {
case WID_N_CAPTION: {
/* Caption is not a real caption (so that the window cannot be moved)
* thus it doesn't get the default sizing of a caption. */
Dimension d2 = GetStringBoundingBox(STR_NEWS_MESSAGE_CAPTION);
d2.height += WD_CAPTIONTEXT_TOP + WD_CAPTIONTEXT_BOTTOM;
*size = maxdim(*size, d2);
return;
}
case WID_N_MGR_FACE:
*size = maxdim(*size, GetSpriteSize(SPR_GRADIENT));
break;

Loading…
Cancel
Save