1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

Fix: Sandbox window does not reduce height when interface scale is reduced. (#11924)

line_height was only ever made larger, and icon.height ignored.
This commit is contained in:
2024-01-29 22:01:22 +00:00
committed by GitHub
parent 4024bb5554
commit 435d48e182

View File

@@ -333,7 +333,7 @@ struct CheatWindow : Window {
}
}
this->line_height = std::max<uint>(this->line_height, SETTING_BUTTON_HEIGHT);
this->line_height = std::max<uint>(this->icon.height, SETTING_BUTTON_HEIGHT);
this->line_height = std::max<uint>(this->line_height, GetCharacterHeight(FS_NORMAL)) + WidgetDimensions::scaled.framerect.Vertical();
size->width = width + WidgetDimensions::scaled.hsep_wide * 2 + SETTING_BUTTON_WIDTH;