mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
feat(tray): support custom icon for dev mode
This commit is contained in:
parent
80ddc8b4ef
commit
0bf3f890a2
@ -22,6 +22,10 @@ inkscape -w 180 -h 180 "../icon-color.svg" -o "./ios/apple-touch-icon.png"
|
||||
# Build PNGs
|
||||
inkscape -w 128 -h 128 "../icon-color.svg" -o "./png/128x128.png"
|
||||
inkscape -w 256 -h 256 "../icon-color.svg" -o "./png/256x256.png"
|
||||
|
||||
# Build dev icons (including tray)
|
||||
inkscape -w 16 -h 16 "../icon-purple.svg" -o "./png/16x16-dev.png"
|
||||
inkscape -w 32 -h 32 "../icon-purple.svg" -o "./png/32x32-dev.png"
|
||||
inkscape -w 256 -h 256 "../icon-purple.svg" -o "./png/256x256-dev.png"
|
||||
|
||||
# Build Mac .icns
|
||||
|
BIN
images/app-icons/png/16x16-dev.png
Normal file
BIN
images/app-icons/png/16x16-dev.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 635 B |
BIN
images/app-icons/png/32x32-dev.png
Normal file
BIN
images/app-icons/png/32x32-dev.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
@ -11,6 +11,7 @@ import becca_service from "../becca/becca_service.js";
|
||||
import type BRecentNote from "../becca/entities/brecent_note.js";
|
||||
import { ipcMain, nativeTheme } from "electron/main";
|
||||
import { default as i18next, t } from "i18next";
|
||||
import { isDev } from "./utils.js";
|
||||
|
||||
let tray: Tray;
|
||||
// `mainWindow.isVisible` doesn't work with `mainWindow.show` and `mainWindow.hide` - it returns `false` when the window
|
||||
@ -31,8 +32,9 @@ function getIconSize() {
|
||||
|
||||
function getTrayIconPath() {
|
||||
const iconSize = getIconSize();
|
||||
const suffix = isDev ? "-dev" : "";
|
||||
|
||||
return path.join(path.dirname(fileURLToPath(import.meta.url)), "../..", "images", "app-icons", "png", `${iconSize}x${iconSize}.png`);
|
||||
return path.join(path.dirname(fileURLToPath(import.meta.url)), "../..", "images", "app-icons", "png", `${iconSize}x${iconSize}${suffix}.png`);
|
||||
}
|
||||
|
||||
function getIconPath(name: string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user