diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-21 10:55:18 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-05 17:51:04 +0200 |
commit | 9bb05de89fcc286a0d78bea12dc779a56c274fb0 (patch) | |
tree | 4170bd68897c5cf27b71badaad2f49e19af4f40a /editor/editor_settings.cpp | |
parent | 57ffc4d82c773a513c8d122d859f07759c8c7da3 (diff) |
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.
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r-- | editor/editor_settings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 74445e6caa..337c9c2eed 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -438,6 +438,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/single_window_mode", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) _initial_set("interface/editor/mouse_extra_buttons_navigate_history", true); _initial_set("interface/editor/save_each_scene_on_quit", true); // Regression + EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/accept_dialog_cancel_ok_buttons", 0, + vformat("Auto (%s),Cancel First,OK First", DisplayServer::get_singleton()->get_swap_cancel_ok() ? "OK First" : "Cancel First"), + PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); #ifdef DEV_ENABLED EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_internal_errors_in_toast_notifications", 0, "Auto (Enabled),Enabled,Disabled") #else |