Changeset - r28250:0a9b32749383
[Not reviewed]
master
0 1 0
Peter Nelson - 11 months ago 2023-12-06 21:36:51
peter1138@openttd.org
Codechange: Vertical spacing for caption is captiontext, not framerect. (#11550)

This does not really matter as the caption height is sized correctly later anyway, so this just avoids confusion.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -2735,13 +2735,13 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, 
 
			break;
 

	
 
		case WWT_CAPTION:
 
			this->SetFill(1, 0);
 
			this->SetResize(1, 0);
 
			this->SetMinimalSize(0, WD_CAPTION_HEIGHT);
 
			this->SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical(), FS_NORMAL);
 
			this->SetMinimalTextLines(1, WidgetDimensions::unscaled.captiontext.Vertical(), FS_NORMAL);
 
			this->SetDataTip(data, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
 
			break;
 

	
 
		case WWT_STICKYBOX:
 
			this->SetFill(0, 0);
 
			this->SetMinimalSize(WD_STICKYBOX_WIDTH, WD_CAPTION_HEIGHT);
0 comments (0 inline, 0 general)