Skip to content

Add an app icon picker to Preferences - #2831

Open
NikKovIos wants to merge 2 commits into
git-up:masterfrom
NikKovIos:feature/app-icon-picker
Open

NikKovIos wants to merge 2 commits into
git-up:masterfrom
NikKovIos:feature/app-icon-picker

Conversation

@NikKovIos

@NikKovIos NikKovIos commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds an App Icon option to Preferences → General, so you can choose which icon GitUp uses. There are two icons for now: the original pink one (default) and a new white one.

Clicking an icon selects it right away. The selected icon is outlined with the system accent color, as in System Settings.

Changes

  • PreferencesWindowController.h/.m: new PreferencesAppIconService, which works like PreferencesThemeService. It saves the choice under the AppIcon user default and applies it in two places:
    • the Dock icon of the running app, via NSApp.applicationIconImage;
    • the icon of GitUp.app in Finder, Launchpad and Spotlight, via -[NSWorkspace setIcon:forFile:options:]. Choosing the pink icon again removes the custom icon.
  • PreferencesWindowController.xib: an "App Icon" row under "Text Size" with two 60 pt icon buttons. Each button sits on a custom NSBox that draws the 3 pt accent-colored outline. The box of the unselected icon is set to transparent. The General tab is 84 pt taller.
  • AppDelegate.m: registers the pink icon as the default and applies the saved icon at launch.
  • Application.xcassets/AppIconWhite.imageset: the white icon (512 px @1x, 1024 px @2x).

Notes

  • A custom icon is stored as an Icon\r file and a Finder info attribute in the root of GitUp.app. While the white icon is selected, codesign --verify --strict reports "resource fork, Finder information, or similar detritus". The app still launches normally. Sparkle updates are not affected either: SUCodeSigningVerifier only reads the designated requirement of the installed app and checks the downloaded update against it.
  • A Sparkle update replaces the bundle and drops the custom icon. At launch GitUp compares the bundle with the saved choice and puts the icon back if it's missing.
  • If the app bundle isn't writable, only the Dock icon changes and a warning is logged.

Testing

  • Builds cleanly (Application scheme, Debug).
  • Selecting White outlines the white icon, adds the custom icon to the bundle (Finder shows the white icon) and saves whiteIcon to AppIcon.
  • Selecting Pink again removes the custom icon. Finder shows the original icon and codesign --verify --strict passes again.
image

Preferences > General gets an "App Icon" row with two icons to choose from: the original pink icon (default) and a new white one. Clicking an icon selects it, and the selected one is outlined with the accent color.

The choice is applied right away to the Dock icon and, through NSWorkspace, to the icon of the app bundle shown in Finder, Launchpad and Spotlight. Choosing the pink icon again removes the custom bundle icon. Updating the app replaces its bundle and drops the custom icon, so it is restored on the next launch.
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the earlier non-blocking concern about removing users’ custom Finder icons still open.

Findings

  1. P2 Existing custom icons disappear ▶

Summary

Adds pink and white app icon choices to Preferences.

  • GitUp lets you choose Pink or White as its app icon.

No new actionable issues were found in the changes since the previous review. Native UI testing was not available on Linux.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[User chooses an icon] --> B[Update outline and VoiceOver value]
  A --> C[Save choice]
  C --> D[Set app bundle icon]
  C --> E[Set Dock icon]
  F[App launches] --> G[Read saved choice]
  G --> H[Restore bundle icon if needed]
  G --> E
Loading

Reviews (2) · Last reviewed commit: "Expose the selected app icon to VoiceOve..." · Reviewed by Greptile

Comment on lines +114 to +115
if (self.bundleHasCustomIcon == [self isDefaultAppIcon:appIcon]) {
[self updateBundleIcon:appIcon];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Existing custom icons disappear

If a user has given GitUp a custom icon in Finder, applySelectedAppIcon removes it on launch even when they have never used this picker. The registered pink default makes this condition true whenever Icon\r exists, and updateBundleIcon then calls setIcon:nil.

Preserve existing custom icons until the user explicitly chooses an icon, or track which icons this feature owns.

Comment thread GitUp/Application/PreferencesWindowController.m
The app icon buttons only showed the selection with the accent outline, so VoiceOver read both of them as plain buttons. They now report the radio button role, with an accessibility value of 1 for the selected icon and 0 for the other one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant