Skip to content

Commit d36b38e

Browse files
authored
fix(desktop-electron): match dev dock icon inset on macOS (anomalyco#19429)
1 parent bdd7829 commit d36b38e

5 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/desktop-electron/icons/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ Here's the process I've been using to create icons:
99

1010
The Image2Icon step is necessary as the `icon.icns` generated by `app-icon.png` does not apply the shadow/padding expected by macOS,
1111
so app icons appear larger than expected.
12+
13+
For unpackaged Electron on macOS, `app.dock.setIcon()` should use a PNG. Keep `dock.png` in each channel folder synced with the
14+
extracted `[email protected]` from that channel's `icon.icns` so the dev Dock icon matches the packaged app inset.
32.6 KB
Loading
49.3 KB
Loading
38 KB
Loading

packages/desktop-electron/src/main/windows.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export function setTitlebar(win: BrowserWindow, theme: Partial<TitlebarTheme> =
5050

5151
export function setDockIcon() {
5252
if (process.platform !== "darwin") return
53-
app.dock?.setIcon(nativeImage.createFromPath(join(iconsDir(), "[email protected]")))
53+
const icon = nativeImage.createFromPath(join(iconsDir(), "dock.png"))
54+
if (!icon.isEmpty()) app.dock?.setIcon(icon)
5455
}
5556

5657
export function createMainWindow(globals: Globals) {

0 commit comments

Comments
 (0)