Change: Automatically set aspect ratio of common window decorations.

This commit is contained in:
Peter Nelson 2024-03-27 09:02:41 +00:00 committed by Peter Nelson
parent d43ff8dc49
commit 61c6ebaacc
1 changed files with 5 additions and 0 deletions

View File

@ -2580,24 +2580,28 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, WidgetID index, uint32_t
this->SetFill(0, 0);
this->SetMinimalSize(WidgetDimensions::WD_STICKYBOX_WIDTH, WidgetDimensions::WD_CAPTION_HEIGHT);
this->SetDataTip(STR_NULL, STR_TOOLTIP_STICKY);
this->SetAspect(this->min_x, this->min_y);
break;
case WWT_SHADEBOX:
this->SetFill(0, 0);
this->SetMinimalSize(WidgetDimensions::WD_SHADEBOX_WIDTH, WidgetDimensions::WD_CAPTION_HEIGHT);
this->SetDataTip(STR_NULL, STR_TOOLTIP_SHADE);
this->SetAspect(this->min_x, this->min_y);
break;
case WWT_DEBUGBOX:
this->SetFill(0, 0);
this->SetMinimalSize(WidgetDimensions::WD_DEBUGBOX_WIDTH, WidgetDimensions::WD_CAPTION_HEIGHT);
this->SetDataTip(STR_NULL, STR_TOOLTIP_DEBUG);
this->SetAspect(this->min_x, this->min_y);
break;
case WWT_DEFSIZEBOX:
this->SetFill(0, 0);
this->SetMinimalSize(WidgetDimensions::WD_DEFSIZEBOX_WIDTH, WidgetDimensions::WD_CAPTION_HEIGHT);
this->SetDataTip(STR_NULL, STR_TOOLTIP_DEFSIZE);
this->SetAspect(this->min_x, this->min_y);
break;
case WWT_RESIZEBOX:
@ -2610,6 +2614,7 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, WidgetID index, uint32_t
this->SetFill(0, 0);
this->SetMinimalSize(WidgetDimensions::WD_CLOSEBOX_WIDTH, WidgetDimensions::WD_CAPTION_HEIGHT);
this->SetDataTip(STR_NULL, STR_TOOLTIP_CLOSE_WINDOW);
this->SetAspect(this->min_x, this->min_y);
break;
case WWT_DROPDOWN: