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

Correctly enforce minimum window size in editor

Also set the maximum size for the language
picked in the project manager.
This commit is contained in:
Yuri Sizov
2023-12-20 13:19:21 +01:00
parent 3ce73e5d41
commit 416e594eb3
3 changed files with 37 additions and 24 deletions

View File

@@ -6852,7 +6852,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"));