feat: add UI settings to support native title bar style #10574
+103
−22
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.
This PR adds a toggle for enabling the native title bar style in the UI settings.
I added it as a hidden option in the internal JSON config instead of exposing it in the UI, since enabling it requires restarting the app — and I think using the native title bar somewhat breaks the app's overall design.
It's better not to expose it until the UI fully supports it.
Enabling the native title bar has a few benefits (mostly due to Tauri's limited native feature support), such as better drag behavior (three finger drag support) and more consistent double-click zoom behavior.
Tauri currently binds double-click on
data-tauri-drag-region
to "maximize", but on macOS this doesn't always match system behavior depending on user settings, which makes GitButler behave inconsistently compared to other apps.https://github.com/tauri-apps/tauri/blob/19fb6f7cb0d702cb2f25f6f2d1e11014d9dada5d/crates/tauri/src/window/scripts/drag.js#L46-L48
Part of this PR depends on my previous one (#10573). If that one can't be merged, I can modify this PR to make it standalone.
If you think adding this setting makes sense but I've missed something, please let me know how I can improve it. If you don't think this setting should exist, feel free to close it.