From 03ce5d40a2d39fd20755fa439aa656e576438363 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Fri, 23 Feb 2024 20:24:37 +0200 Subject: [PATCH] Set the window's minimum size only once in Main.gd --- src/Main.gd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Main.gd b/src/Main.gd index b83cfb1e8..8d1645b95 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -119,15 +119,13 @@ func _setup_application_window_size() -> void: var root := get_tree().root root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_IGNORE root.content_scale_mode = Window.CONTENT_SCALE_MODE_DISABLED + # Set a minimum window size to prevent UI elements from collapsing on each other. root.min_size = Vector2(1024, 576) root.content_scale_factor = Global.shrink set_custom_cursor() if OS.get_name() == "Web": return - # Set a minimum window size to prevent UI elements from collapsing on each other. - get_window().min_size = Vector2(1024, 576) - # Restore the window position/size if values are present in the configuration cache if Global.config_cache.has_section_key("window", "screen"): get_window().current_screen = Global.config_cache.get_value("window", "screen")