From 7c0e5f032b9f706c5d632fa7e17883cdb010f5ae Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 29 Jan 2024 21:14:23 +0000 Subject: [PATCH] Fix: Sandbox window does not reduce height when interface scale is reduced. line_height was only ever made larger, and icon.height ignored. --- src/cheat_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 45afc32c70..bbc518047f 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -333,7 +333,7 @@ struct CheatWindow : Window { } } - this->line_height = std::max(this->line_height, SETTING_BUTTON_HEIGHT); + this->line_height = std::max(this->icon.height, SETTING_BUTTON_HEIGHT); this->line_height = std::max(this->line_height, GetCharacterHeight(FS_NORMAL)) + WidgetDimensions::scaled.framerect.Vertical(); size->width = width + WidgetDimensions::scaled.hsep_wide * 2 + SETTING_BUTTON_WIDTH;