Add editor setting for AcceptDialog OK/Cancel buttons positioning #59382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@bruvzg I used "OK First" instead of "OK Left" assuming that this would be handled with UI mirroring too for RTL, but it doesn't seem to be (at least from a quick look at
scene/gui/dialogs.cpp
). I don't know if it should be, we'd have to check e.g. Arabic on Windows and macOS.Also, I find this whole
swap_cancel_ok
API in AcceptDialog a bit hacky (and badly named as it doesn't tell users swapping from what to what, i.e. that the "reference" unswapped positions are the GNOME/macOS ones). And on Linux one could make a case to have the behavior DE-dependent so that on predominantly Qt-based KDE it would follow the Windows convention... but that's a mess (and as a KDE user I wouldn't like the behavior to change now that I'm used to OK on the right).