Skip to content

Support choosing light, dark, or the system appearance (issue #714) - #715

Merged
hannesa2 merged 1 commit into
masterfrom
choose-light-dark-or-system-appearance
Sep 23, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
choose-light-dark-or-system-appearance

Conversation

@goneng

@goneng goneng commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Some users want GitX to stay light or dark whatever the rest of the Mac is doing, which until now only System Settings could decide. Closes #714.

  • Store the choice as PBAppearance, defaulting to following the system
  • Apply it to NSApp.appearance before the first window opens, so no window shows the wrong appearance at launch
  • Offer it as a popup in Settings > General and as a View > Appearance submenu, both driving the same default
  • Leave every existing consumer of the appearance alone: overriding NSApp.appearance updates effectiveAppearance, which already drives them

nil is what "System" applies, rather than reading the system setting and applying it explicitly, so following the system stays live.

Screenshots

image image image

Test plan

  • Launch with PBAppearance set to Dark on a Light Mac: the app comes up dark, with no flash of the wrong appearance
  • Pick each of System, Light and Dark from View > Appearance: the app switches, the default is written, and the checkmark follows
  • Pick Dark from the Settings > General popup: the same default is written and the menu checkmark moves with it, so the two controls stay in sync
  • Colors themselves still want an eye on the history, blame and fileview panes under a forced appearance, which is the part no automated check covers here

@goneng
goneng force-pushed the choose-light-dark-or-system-appearance branch 2 times, most recently from 482ccdc to 2489441 Compare September 22, 2026 18:26
Some users want GitX to stay light or dark whatever the rest of the Mac
is doing, which until now only System Settings could decide.

- Store the choice as PBAppearance, defaulting to following the system
- Apply it to NSApp.appearance before the first window opens, so no
  window shows the wrong appearance at launch
- Offer it as a popup in Settings > General and as a View > Appearance
  submenu, both driving the same default
- Leave every existing consumer of the appearance alone: overriding
  NSApp.appearance updates effectiveAppearance, which already drives
  them
- Give the General pane the height the new row needs, and settle the
  Integration pane on the same margins while there, so all three panes
  stand 38 points clear at the top and 35 at the bottom
@goneng
goneng force-pushed the choose-light-dark-or-system-appearance branch from 2489441 to 02c4fee Compare September 22, 2026 20:08
@goneng
goneng marked this pull request as ready for review September 22, 2026 20:31
@goneng
goneng requested a review from hannesa2 September 22, 2026 20:40
@hannesa2
hannesa2 requested a lite review from Copilot September 23, 2026 04:09

@hannesa2 hannesa2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, I'm fine with it. But wait for the Copilot review, if it finds a high issue

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Invalid persisted appearance values can leave the Settings popup and menu checkmark unsynchronized.

Review effort: Lite
Findings: None

What changed in this PR

Adds persistent System, Light, or Dark appearance selection, applied at launch and exposed in Settings and the View menu.

Changes:

  • Stores and retrieves the appearance preference.
  • Applies appearance changes globally.
  • Adds synchronized Settings and View menu controls.
File Description
Resources/​en.lproj/​Preferences.xib Adds the appearance preference popup.
Resources/​en.lproj/​MainMenu.xib Adds the Appearance submenu.
Classes/​git/​PBGitDefaults.m Stores and retrieves the appearance setting.
Classes/​git/​PBGitDefaults.h Defines the appearance settings API.
Classes/​Controllers/​ApplicationController.m Applies and validates appearance choices.
Classes/​Controllers/​ApplicationController.h Declares the appearance action.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hannesa2
hannesa2 merged commit 72f2c92 into master Sep 23, 2026
4 checks passed
@hannesa2
hannesa2 deleted the choose-light-dark-or-system-appearance branch September 23, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance: Allow choosing a light or dark appearance instead of following the system

3 participants