1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 20:43:04 +01:00

Scenery window: increase minimum height

This increases the minimum height of the Scenery window to fit at least 1.5 rows of scenery items, instead of 1 row. This is done to ensure the eyedropper and scatter tools are visible with multiple rows of tabs as well.

Before:
<img width="634" height="224" alt="Imagination Megapark 2025-09-15 22-38-56" src="https://github.com/user-attachments/assets/dcce9fad-a8e1-4001-9552-dd1ff97c082c" />

After:
<img width="634" height="264" alt="Imagination Megapark 2025-09-15 22-38-46" src="https://github.com/user-attachments/assets/8e545aa7-8aef-4642-b78e-858bed2db1e8" />
This commit is contained in:
Aaron van Geffen
2025-09-17 23:51:12 +02:00
committed by GitHub
parent 51b4bbbce5
commit f5faef7bea
2 changed files with 12 additions and 3 deletions

View File

@@ -1105,10 +1105,18 @@ namespace OpenRCT2::Ui::Windows
private:
int32_t GetMinimumHeight() const
{
// Minimum window height: title, one scenery button, status bar, padding
int32_t newMinHeight = getTitleBarTargetHeight() + kSceneryButtonHeight + kDescriptionHeight + 2 * kTabMargin;
newMinHeight += static_cast<int32_t>(1 + (_tabEntries.size() / GetMaxTabCountInARow())) * kTabHeight;
// Minimum window height: title, status bar, padding
int32_t newMinHeight = getTitleBarTargetHeight() + kDescriptionHeight + 2 * kTabMargin;
// Room for the search/filter widget
newMinHeight += widgets[WIDX_FILTER_TEXT_BOX].height() + 2 * kInputMargin;
// Fit *all* rows of tabs
newMinHeight += static_cast<int32_t>(1 + (_tabEntries.size() / GetMaxTabCountInARow())) * kTabHeight;
// And at least 1.5 rows of scenery items
newMinHeight += 1.5 * kSceneryButtonHeight;
return newMinHeight;
}