From 7d2ee73a1ad643ac662cb5da96a3ade81946cdfa Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 17 Oct 2019 14:28:46 +0200 Subject: [PATCH] Define a minimum window size when supported This prevents UI elements from collapsing when resizing the window. --- addons/material_maker/main_window.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/material_maker/main_window.gd b/addons/material_maker/main_window.gd index 5bfce54..d4aca6b 100644 --- a/addons/material_maker/main_window.gd +++ b/addons/material_maker/main_window.gd @@ -41,6 +41,10 @@ const MENU = [ signal quit func _ready(): + # Set a minimum window size to prevent UI elements from collapsing on each other. + # This property is only available in 3.2alpha or later, so use `set()` to fail gracefully if it doesn't exist. + OS.set("min_window_size", Vector2(1024, 600)) + if !Engine.editor_hint: OS.set_window_title(ProjectSettings.get_setting("application/config/name")+" v"+ProjectSettings.get_setting("application/config/release")) load_recents()