Change: Use aspect ratio for common left/right buttons.

This commit is contained in:
Peter Nelson 2024-03-27 09:02:42 +00:00 committed by Peter Nelson
parent 16eb17418b
commit 7e049aa2b1
2 changed files with 5 additions and 0 deletions

View File

@ -2559,9 +2559,13 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, WidgetID index, uint32_t
case WWT_MATRIX:
case NWID_BUTTON_DROPDOWN:
case NWID_PUSHBUTTON_DROPDOWN:
this->SetFill(0, 0);
break;
case WWT_ARROWBTN:
case WWT_PUSHARROWBTN:
this->SetFill(0, 0);
this->SetAspect(WidgetDimensions::ASPECT_LEFT_RIGHT_BUTTON);
break;
case WWT_EDITBOX:

View File

@ -71,6 +71,7 @@ public:
static constexpr float ASPECT_RENAME = 12.f / 14.f;
static constexpr float ASPECT_SETTINGS_BUTTON = 21.f / 12.f;
static constexpr float ASPECT_TOGGLE_SIZE = 12.f / 14.f;
static constexpr float ASPECT_LEFT_RIGHT_BUTTON = 8.f / 12.f;
static constexpr float ASPECT_UP_DOWN_BUTTON = 11.f / 12.f;
static constexpr float ASPECT_VEHICLE_ICON = 15.f / 12.f;
static constexpr float ASPECT_VEHICLE_FLAG = 11.f / 12.f;