Quellcode durchsuchen

Merge pull request #31443 from Calinou/editor-use-minimum-window-size

Define a minimum window size in the editor and project manager
Rémi Verschelde vor 6 Jahren
Ursprung
Commit
4e760096a9
2 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. 3 0
      editor/editor_node.cpp
  2. 3 0
      editor/project_manager.cpp

+ 3 - 0
editor/editor_node.cpp

@@ -5512,6 +5512,9 @@ EditorNode::EditorNode() {
 		}
 		}
 	}
 	}
 
 
+	// Define a minimum window size to prevent UI elements from overlapping or being cut off
+	OS::get_singleton()->set_min_window_size(Size2(1024, 600) * EDSCALE);
+
 	ResourceLoader::set_abort_on_missing_resources(false);
 	ResourceLoader::set_abort_on_missing_resources(false);
 	FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
 	FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
 	EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
 	EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));

+ 3 - 0
editor/project_manager.cpp

@@ -2270,6 +2270,9 @@ ProjectManager::ProjectManager() {
 			} break;
 			} break;
 		}
 		}
 
 
+		// Define a minimum window size to prevent UI elements from overlapping or being cut off
+		OS::get_singleton()->set_min_window_size(Size2(750, 420) * EDSCALE);
+
 #ifndef OSX_ENABLED
 #ifndef OSX_ENABLED
 		// The macOS platform implementation uses its own hiDPI window resizing code
 		// The macOS platform implementation uses its own hiDPI window resizing code
 		// TODO: Resize windows on hiDPI displays on Windows and Linux and remove the line below
 		// TODO: Resize windows on hiDPI displays on Windows and Linux and remove the line below