Skip to content

gitbutler.noShadow git config removes macos shadow#13371

Open
schacon wants to merge 1 commit intomasterfrom
sc-branch-97
Open

gitbutler.noShadow git config removes macos shadow#13371
schacon wants to merge 1 commit intomasterfrom
sc-branch-97

Conversation

@schacon
Copy link
Copy Markdown
Member

@schacon schacon commented Apr 18, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 18, 2026 08:44
@github-actions github-actions Bot added the rust Pull requests that update Rust code label Apr 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a macOS-specific toggle to disable the Tauri window shadow based on a user Git config key (gitbutler.noShadow), allowing runtime UI behavior changes via Git configuration.

Changes:

  • Introduces a macOS-only helper to read gitbutler.noShadow from Git config.
  • Applies the config-derived value to the Tauri window builder via .shadow(!no_shadow).

Comment on lines +289 to +293
let config = match git2::Config::open_default() {
Ok(config) => config,
Err(error) => {
tracing::warn!(?error, "failed to open global git config, keeping window shadow");
return false;
@krlvi
Copy link
Copy Markdown
Member

krlvi commented Apr 18, 2026

@schacon we are likely better off putting this config in UiSettings in crates/but-settings/src/app_settings.rs similar to use_native_title_bar.
The function create in crates/gitbutler-tauri/src/window.rs already has the settings loaded there, checking use_native_title_bar so no_shadow can be just like it.
You can then set it via ~/Library/Application\ Support/gitbutler/settings.json

There's a plan to migrate the app settings to a dedicated gitconfig file at some point in the future but haven't been able to prioritize it, and it's nicer to keep it consistent for now. Plus we avoid introducing libgi2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants