diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-04-08 09:02:38 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-04-30 17:08:15 +0100 |
commit | 03a43b824711898fe2c9f401a48fe2420d0abc28 (patch) | |
tree | f3a0167b631c0fdd3fae960ac8d043e1da99c4a0 /src/widget.cpp | |
parent | f5569763c9f34a32f59257f61f9797d54ace7b21 (diff) | |
download | openttd-03a43b824711898fe2c9f401a48fe2420d0abc28.tar.xz |
Cleanup: Call SetMinimalSize instead of setting min_y directly.
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index 705b93a94..931b525d4 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -2268,7 +2268,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; @@ -2310,7 +2311,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; |