feat(brand): apply Fabric app + tray icons

- assets/icon.png (512) -> BrowserWindow icon; build/icon.png (1024)
  for electron-builder (linux uses it directly, mac/win generated from
  it); package.json build.files += assets/**, build.icon set.
- Tray: replace the placeholder base64 data-URL with the designed
  no-text tray icon (assets/tray.png 22 + tray@2x.png 44) via
  nativeImage.createFromPath.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
h z
2026-05-16 11:04:55 +01:00
parent 1476ff7bb4
commit ca51ba7063
6 changed files with 5 additions and 4 deletions

View File

@@ -60,6 +60,7 @@ function createWindow() {
minWidth: 1024,
minHeight: 700,
title: 'Fabric Desktop',
icon: path.join(__dirname, 'assets/icon.png'),
autoHideMenuBar: false,
webPreferences: {
contextIsolation: true,
@@ -99,9 +100,7 @@ function createWindow() {
function createTrayIcon() {
if (tray) return tray
const iconDataUrl =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAfElEQVR4AWNw4PjPwMDA8J+BgYHhP4MDA8N/BgYGhv8MDAwM/2dgYGB4R2JgYGB4w8DAwPCfgYGB4R8DAwPDf4aGhob/BgwMDAz/Z2BgYHhHYmBgYHjDwMDA8J+BgYHhHwMDA8N/hoYGhv8GDAwMDP9nYGBgeEdiYGAAAB7RImfVq6X8AAAAAElFTkSuQmCC'
const icon = nativeImage.createFromDataURL(iconDataUrl)
const icon = nativeImage.createFromPath(path.join(__dirname, 'assets/tray.png'))
tray = new Tray(icon)
tray.setToolTip('Fabric Desktop')