You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add editor setting for AcceptDialog OK/Cancel buttons positioning
The position (left/right) of the Cancel and OK buttons in AcceptDialog are DisplayServer specific, as Windows uses OK/Cancel and macOS uses Cancel/OK. Linux/X11 currently uses the macOS convention which is also the GTK+/GNOME one, though it's not consistent with Qt/KDE applications which follow the Windows convention. Since that can't satisfy everyone, it's best if it's configurable also for the editor (it's already configurable for the project). Fixes #59379.
This commit is contained in:
@@ -6181,10 +6181,17 @@ EditorNode::EditorNode() {
|
||||
// Define a minimum window size to prevent UI elements from overlapping or being cut off.
|
||||
DisplayServer::get_singleton()->window_set_min_size(Size2(1024, 600) * EDSCALE);
|
||||
|
||||
ResourceLoader::set_abort_on_missing_resources(false);
|
||||
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_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
|
||||
|
||||
int swap_cancel_ok = EDITOR_GET("interface/editor/accept_dialog_cancel_ok_buttons");
|
||||
if (swap_cancel_ok != 0) { // 0 is auto, set in register_scene based on DisplayServer.
|
||||
// Swap on means OK first.
|
||||
AcceptDialog::set_swap_cancel_ok(swap_cancel_ok == 2);
|
||||
}
|
||||
|
||||
ResourceLoader::set_abort_on_missing_resources(false);
|
||||
ResourceLoader::set_error_notify_func(this, _load_error_notify);
|
||||
ResourceLoader::set_dependency_error_notify_func(this, _dependency_error_report);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user