Skip to content

Commit 8350ce8

Browse files
committed
fix
1 parent f5b7a37 commit 8350ce8

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

apps/desktop/src/main/index.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,19 @@ function main(): void {
412412
})
413413

414414
void app.whenReady().then(async () => {
415-
// Use the same high-resolution source in packaged and unpackaged apps so
416-
// macOS renders every environment marker consistently in the Dock.
417-
if (process.platform === 'darwin') {
415+
// Unpackaged runs only: `electron .` has no bundle, so macOS shows the
416+
// default Electron atom in the Dock unless we set the mark ourselves.
417+
//
418+
// A PACKAGED app must NOT do this. It already carries the per-channel
419+
// build/icon*.icns, which Finder, the dmg, Launchpad, Cmd-Tab and the Dock
420+
// all read — and the icns holds every representation up to 1024px, while
421+
// these PNGs are a single 512px copy of the same artwork with no @2x. A
422+
// lone PNG loads at scale factor 1, so macOS treated 512px as 512 POINTS
423+
// and upscaled it 2x on Retina: the running app's Dock icon came out
424+
// visibly softer than the identical icon shown for the same app when it
425+
// was closed. Overriding a correct multi-resolution icon with a low-res
426+
// copy of itself is all this ever did once packaged.
427+
if (process.platform === 'darwin' && !app.isPackaged) {
418428
const channel = channelForOrigin(config.getOrigin())
419429
app.dock?.setIcon(join(__dirname, '..', 'static', DOCK_ICON_FOR_CHANNEL[channel]))
420430
}

0 commit comments

Comments
 (0)