Merge pull request #424 from alexbcberio/stable
Fix tray icon resolution for Windows platforms
6
.gitignore
vendored
@@ -5,6 +5,10 @@ tmp
|
||||
|
||||
.vscode
|
||||
.env
|
||||
.yarn/*
|
||||
!.yarn/releases
|
||||
!.yarn/plugins
|
||||
.pnp.*
|
||||
|
||||
src/package-lock.json
|
||||
src/package.json
|
||||
@@ -13,4 +17,4 @@ src/update.ini
|
||||
*.exe
|
||||
*.app
|
||||
*.xml.backup
|
||||
*.js
|
||||
*.js
|
||||
|
||||
BIN
src/assets/tray/Icon.ico
Normal file
|
After Width: | Height: | Size: 402 KiB |
BIN
src/assets/tray/Icon@1.25x.png
Normal file
|
After Width: | Height: | Size: 384 B |
BIN
src/assets/tray/Icon@1.5x.png
Normal file
|
After Width: | Height: | Size: 445 B |
BIN
src/assets/tray/Icon@1.8x.png
Normal file
|
After Width: | Height: | Size: 481 B |
BIN
src/assets/tray/Icon@16x.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/tray/Icon@2.5x.png
Normal file
|
After Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 506 B |
BIN
src/assets/tray/Icon@3x.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
src/assets/tray/Icon@4x.png
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
src/assets/tray/Icon@5x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/tray/Icon@8x.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 343 B |
1
src/assets/tray/icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" id="Слой_1" data-name="Слой 1" viewBox="0 0 512 512"><defs><style>.cls-1{fill:#fff;fill-rule:evenodd}</style></defs><title>pmd_logo_1</title><path d="M459.17,105H52.83a30.35,30.35,0,0,0-30.34,30.34V376.66A30.35,30.35,0,0,0,52.83,407H459.17a30.35,30.35,0,0,0,30.34-30.34V135.34A30.35,30.35,0,0,0,459.17,105Zm-185,94.4a13.93,13.93,0,0,1,9.9-4.11h90.29a14,14,0,0,1,0,28H284a14,14,0,0,1-9.9-23.91Zm-63.64,63.11L92.14,330.83a7.51,7.51,0,0,1-11.27-6.51V187.68a7.51,7.51,0,0,1,11.27-6.51l118.34,68.32A7.52,7.52,0,0,1,210.48,262.51ZM441.81,312.6a13.93,13.93,0,0,1-9.9,4.11H284a14,14,0,0,1,0-28H431.91a14,14,0,0,1,9.9,23.91Zm0-46.7a13.93,13.93,0,0,1-9.9,4.11H284a14,14,0,0,1,0-28H431.91a14,14,0,0,1,9.9,23.91Z" class="cls-1"/></svg>
|
||||
|
After Width: | Height: | Size: 771 B |
BIN
src/assets/tray/windows_icon.xcf
Normal file
@@ -5,10 +5,20 @@ import { checkForUpdate, update, updateAvailable } from "../util/updateChecker";
|
||||
import { connected } from "./socketManager";
|
||||
import { platform } from "os";
|
||||
|
||||
let trayIcon =
|
||||
platform() === "darwin"
|
||||
? join(__dirname, "../assets/tray/IconTemplate.png")
|
||||
: join(__dirname, "../assets/tray/Icon@2x.png");
|
||||
let trayIcon;
|
||||
|
||||
switch (platform()) {
|
||||
case "darwin":
|
||||
trayIcon = join(__dirname, "../assets/tray/IconTemplate.png");
|
||||
break;
|
||||
case "win32":
|
||||
trayIcon = join(__dirname, "../assets/tray/Icon.ico");
|
||||
break;
|
||||
default:
|
||||
trayIcon = join(__dirname, "../assets/tray/Icon@4x.png");
|
||||
break;
|
||||
}
|
||||
|
||||
export class TrayManager {
|
||||
tray: Tray;
|
||||
|
||||
@@ -26,7 +36,7 @@ export class TrayManager {
|
||||
icon:
|
||||
platform() === "darwin"
|
||||
? join(__dirname, "../assets/tray/IconTemplate.png")
|
||||
: join(__dirname, "../assets/tray/Icon.png"),
|
||||
: join(__dirname, "../assets/tray/Icon@4x.png"),
|
||||
label: `${app.name} v${app.getVersion()}`,
|
||||
enabled: false
|
||||
},
|
||||
|
||||