1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Correctly enforce minimum window size in editor

Also set the maximum size for the language
picked in the project manager.

(cherry picked from commit 416e594eb3)
This commit is contained in:
Yuri Sizov
2023-12-20 13:19:21 +01:00
parent 663ba67016
commit dd665988d7
3 changed files with 37 additions and 24 deletions

View File

@@ -6861,7 +6861,9 @@ EditorNode::EditorNode() {
// Define a minimum window size to prevent UI elements from overlapping or being cut off.
Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root());
if (w) {
w->set_min_size(Size2(1024, 600) * EDSCALE);
const Size2 minimum_size = Size2(1024, 600) * EDSCALE;
w->set_min_size(minimum_size); // Calling it this early doesn't sync the property with DS.
DisplayServer::get_singleton()->window_set_min_size(minimum_size);
}
EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));