You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +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.
(cherry picked from commit 9bb05de89f)
This commit is contained in:
committed by
Haoyu Qiu
parent
87296b3ea5
commit
7f0b3bc2a0
@@ -5921,10 +5921,17 @@ 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);
|
||||
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 OS.
|
||||
// Swap on means OK first.
|
||||
AcceptDialog::set_swap_ok_cancel(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