Cleanup: Call SetMinimalSize instead of setting min_y directly.
(cherry picked from commit 03a43b8247
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
23938cb583
commit
1a4a6f579e
@@ -2337,7 +2337,8 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint32 data,
|
||||
case WWT_CAPTION:
|
||||
this->SetFill(1, 0);
|
||||
this->SetResize(1, 0);
|
||||
this->min_y = WD_CAPTION_HEIGHT;
|
||||
this->SetMinimalSize(0, WD_CAPTION_HEIGHT);
|
||||
this->SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM, FS_NORMAL);
|
||||
this->SetDataTip(data, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
|
||||
break;
|
||||
|
||||
@@ -2379,7 +2380,7 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint32 data,
|
||||
|
||||
case WWT_DROPDOWN:
|
||||
this->SetFill(0, 0);
|
||||
this->min_y = WD_DROPDOWN_HEIGHT;
|
||||
this->SetMinimalSize(0, WD_DROPDOWN_HEIGHT);
|
||||
this->SetAlignment(SA_TOP | SA_LEFT);
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user