diff --git a/packages/gui/build/icons/1024x1024.png b/packages/gui/build/mac/1024x1024.png similarity index 100% rename from packages/gui/build/icons/1024x1024.png rename to packages/gui/build/mac/1024x1024.png diff --git a/packages/gui/build/icons/128x128.png b/packages/gui/build/mac/128x128.png similarity index 100% rename from packages/gui/build/icons/128x128.png rename to packages/gui/build/mac/128x128.png diff --git a/packages/gui/build/icons/16x16.png b/packages/gui/build/mac/16x16.png similarity index 100% rename from packages/gui/build/icons/16x16.png rename to packages/gui/build/mac/16x16.png diff --git a/packages/gui/build/icons/24x24.png b/packages/gui/build/mac/24x24.png similarity index 100% rename from packages/gui/build/icons/24x24.png rename to packages/gui/build/mac/24x24.png diff --git a/packages/gui/build/icons/256x256.png b/packages/gui/build/mac/256x256.png similarity index 100% rename from packages/gui/build/icons/256x256.png rename to packages/gui/build/mac/256x256.png diff --git a/packages/gui/build/icons/32x32.png b/packages/gui/build/mac/32x32.png similarity index 100% rename from packages/gui/build/icons/32x32.png rename to packages/gui/build/mac/32x32.png diff --git a/packages/gui/build/icons/48x48.png b/packages/gui/build/mac/48x48.png similarity index 100% rename from packages/gui/build/icons/48x48.png rename to packages/gui/build/mac/48x48.png diff --git a/packages/gui/build/icons/512x512.png b/packages/gui/build/mac/512x512.png similarity index 100% rename from packages/gui/build/icons/512x512.png rename to packages/gui/build/mac/512x512.png diff --git a/packages/gui/build/icons/64x64.png b/packages/gui/build/mac/64x64.png similarity index 100% rename from packages/gui/build/icons/64x64.png rename to packages/gui/build/mac/64x64.png diff --git a/packages/gui/build/icons/icon.icns b/packages/gui/build/mac/icon.icns similarity index 100% rename from packages/gui/build/icons/icon.icns rename to packages/gui/build/mac/icon.icns diff --git a/packages/gui/build/icons/icon.ico b/packages/gui/build/mac/icon.ico similarity index 100% rename from packages/gui/build/icons/icon.ico rename to packages/gui/build/mac/icon.ico diff --git a/packages/gui/extra/icons/1024x1024.png b/packages/gui/extra/icons/1024x1024.png index 7000645e..7788ada1 100644 Binary files a/packages/gui/extra/icons/1024x1024.png and b/packages/gui/extra/icons/1024x1024.png differ diff --git a/packages/gui/extra/icons/128x128.png b/packages/gui/extra/icons/128x128.png index 904834a5..ac7e1cb3 100644 Binary files a/packages/gui/extra/icons/128x128.png and b/packages/gui/extra/icons/128x128.png differ diff --git a/packages/gui/extra/icons/16x16.png b/packages/gui/extra/icons/16x16.png index 8f7e5e4c..c77fedad 100644 Binary files a/packages/gui/extra/icons/16x16.png and b/packages/gui/extra/icons/16x16.png differ diff --git a/packages/gui/extra/icons/24x24.png b/packages/gui/extra/icons/24x24.png index 182ec323..c2faa1ed 100644 Binary files a/packages/gui/extra/icons/24x24.png and b/packages/gui/extra/icons/24x24.png differ diff --git a/packages/gui/extra/icons/256x256.png b/packages/gui/extra/icons/256x256.png index 1b07afab..dc41d743 100644 Binary files a/packages/gui/extra/icons/256x256.png and b/packages/gui/extra/icons/256x256.png differ diff --git a/packages/gui/extra/icons/32x32.png b/packages/gui/extra/icons/32x32.png index 705381a9..4712b928 100644 Binary files a/packages/gui/extra/icons/32x32.png and b/packages/gui/extra/icons/32x32.png differ diff --git a/packages/gui/extra/icons/48x48.png b/packages/gui/extra/icons/48x48.png index 1b81879c..7f3fb8eb 100644 Binary files a/packages/gui/extra/icons/48x48.png and b/packages/gui/extra/icons/48x48.png differ diff --git a/packages/gui/extra/icons/512x512.png b/packages/gui/extra/icons/512x512.png index 0702bbd3..ed4e3f63 100644 Binary files a/packages/gui/extra/icons/512x512.png and b/packages/gui/extra/icons/512x512.png differ diff --git a/packages/gui/extra/icons/64x64.png b/packages/gui/extra/icons/64x64.png index 6ff4bd55..983d8fff 100644 Binary files a/packages/gui/extra/icons/64x64.png and b/packages/gui/extra/icons/64x64.png differ diff --git a/packages/gui/extra/icons/icon.icns b/packages/gui/extra/icons/icon.icns index 3fec87ac..39bee01a 100644 Binary files a/packages/gui/extra/icons/icon.icns and b/packages/gui/extra/icons/icon.icns differ diff --git a/packages/gui/extra/icons/icon.ico b/packages/gui/extra/icons/icon.ico index f2e2683b..d285f978 100644 Binary files a/packages/gui/extra/icons/icon.ico and b/packages/gui/extra/icons/icon.ico differ diff --git a/packages/gui/package.json b/packages/gui/package.json index b83a717b..ecc00df8 100644 --- a/packages/gui/package.json +++ b/packages/gui/package.json @@ -10,7 +10,8 @@ "electron": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps", - "electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten" + "electron:icons": "electron-icon-builder --input=./public/logo/win.png --output=build --flatten", + "electron:icons-mac": "electron-icon-builder --input=./public/logo/mac.png --output=build --flatten" }, "author": "docmirror.cn", "main": "background.js", diff --git a/packages/gui/public/logo/logo-win.png b/packages/gui/public/logo/logo-win.png deleted file mode 100644 index 1cba5efa..00000000 Binary files a/packages/gui/public/logo/logo-win.png and /dev/null differ diff --git a/packages/gui/public/logo/mac.png b/packages/gui/public/logo/mac.png new file mode 100644 index 00000000..af77cd15 Binary files /dev/null and b/packages/gui/public/logo/mac.png differ diff --git a/packages/gui/public/logo/logo-mac.svg b/packages/gui/public/logo/mac.svg similarity index 83% rename from packages/gui/public/logo/logo-mac.svg rename to packages/gui/public/logo/mac.svg index 78322164..54093ad6 100644 --- a/packages/gui/public/logo/logo-mac.svg +++ b/packages/gui/public/logo/mac.svg @@ -23,16 +23,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/packages/gui/public/logo/win.png b/packages/gui/public/logo/win.png new file mode 100644 index 00000000..01808dd9 Binary files /dev/null and b/packages/gui/public/logo/win.png differ diff --git a/packages/gui/public/logo/logo-win.svg b/packages/gui/public/logo/win.svg similarity index 80% rename from packages/gui/public/logo/logo-win.svg rename to packages/gui/public/logo/win.svg index c7991bf1..a3695ca8 100644 --- a/packages/gui/public/logo/logo-win.svg +++ b/packages/gui/public/logo/win.svg @@ -1,19 +1,19 @@ - 画板 - - - + window + + + - - - - - + + + + + diff --git a/packages/gui/src/background.js b/packages/gui/src/background.js index b1db9955..ab06549f 100644 --- a/packages/gui/src/background.js +++ b/packages/gui/src/background.js @@ -40,7 +40,11 @@ function setTray (app) { } ] // 设置系统托盘图标 - const iconPath = path.join(__dirname, '../extra/icons/16x16.png') + let icon = '32x32.png' + if (isMac) { + icon = '16x16.png' + } + const iconPath = path.join(__dirname, '../extra/icons/', icon) const appTray = new Tray(iconPath) // 图标的上下文菜单 @@ -128,7 +132,7 @@ function setDock () { const { app } = require('electron') if (process.platform === 'darwin') { app.whenReady().then(() => { - app.dock.setIcon(path.join(__dirname, '../build/icons/512x512.png')) + app.dock.setIcon(path.join(__dirname, '../build/mac/512x512.png')) }) } }