Skip to content

Commit f03ea7b

Browse files
Covkiehiratazx
authored andcommitted
New Vesktop Icon
feedback welcome. Also cleaned up icons and removed dynamically setting the icon (electron builder handles this) Signed-off-by: hiratazx <[email protected]>
1 parent 6c4ecc0 commit f03ea7b

File tree

12 files changed

+10
-12
lines changed

12 files changed

+10
-12
lines changed

build/icon.icns

-4.32 KB
Binary file not shown.

build/icon.ico

364 KB
Binary file not shown.

build/icon.svg

Lines changed: 1 addition & 0 deletions
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
],
7474
"beforePack": "scripts/build/sandboxFix.js",
7575
"linux": {
76-
"icon": "build/icon.icns",
76+
"icon": "build/icon.svg",
7777
"category": "Network",
7878
"maintainer": "[email protected]",
7979
"target": [
@@ -159,6 +159,7 @@
159159
"oneClick": false
160160
},
161161
"win": {
162+
"icon": "build/icon.ico",
162163
"target": [
163164
{
164165
"target": "nsis",

src/main/about.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
import { BrowserWindow } from "electron";
88
import { join } from "path";
9-
import { ICON_PATH, VIEW_DIR } from "shared/paths";
9+
import { VIEW_DIR } from "shared/paths";
1010

1111
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
1212

1313
export function createAboutWindow() {
1414
const about = new BrowserWindow({
1515
center: true,
1616
autoHideMenuBar: true,
17-
icon: ICON_PATH,
1817
webPreferences: {
1918
preload: join(__dirname, "updaterPreload.js")
2019
}

src/main/firstLaunch.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { BrowserWindow } from "electron/main";
99
import { copyFileSync, mkdirSync, readdirSync } from "fs";
1010
import { join } from "path";
1111
import { SplashProps } from "shared/browserWinProperties";
12-
import { ICON_PATH, VIEW_DIR } from "shared/paths";
12+
import { VIEW_DIR } from "shared/paths";
1313

1414
import { autoStart } from "./autoStart";
1515
import { DATA_DIR } from "./constants";
@@ -31,8 +31,7 @@ export function createFirstLaunchTour() {
3131
frame: true,
3232
autoHideMenuBar: true,
3333
height: 470,
34-
width: 550,
35-
icon: ICON_PATH
34+
width: 550
3635
});
3736

3837
makeLinksOpenExternally(win);

src/main/mainWindow.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { isTruthy } from "shared/utils/guards";
2323
import { once } from "shared/utils/once";
2424
import type { SettingsStore } from "shared/utils/SettingsStore";
2525

26-
import { ICON_PATH } from "../shared/paths";
26+
import { TRAY_ICON_PATH } from "../shared/paths";
2727
import { createAboutWindow } from "./about";
2828
import { initArRPC } from "./arrpc";
2929
import {
@@ -123,7 +123,7 @@ function initTray(win: BrowserWindow) {
123123
}
124124
]);
125125

126-
tray = new Tray(ICON_PATH);
126+
tray = new Tray(TRAY_ICON_PATH);
127127
tray.setToolTip("Vesktop");
128128
tray.setContextMenu(trayMenu);
129129
tray.on("click", onTrayClick);
@@ -407,7 +407,6 @@ function createMainWindow() {
407407
// disable renderer backgrounding to prevent the app from unloading when in the background
408408
backgroundThrottling: false
409409
},
410-
icon: ICON_PATH,
411410
frame: !noFrame,
412411
...(transparent && {
413412
transparent: true,

src/main/splash.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
import { BrowserWindow } from "electron";
88
import { join } from "path";
99
import { SplashProps } from "shared/browserWinProperties";
10-
import { ICON_PATH, VIEW_DIR } from "shared/paths";
10+
import { VIEW_DIR } from "shared/paths";
1111

1212
import { Settings } from "./settings";
1313

1414
export function createSplashWindow(startMinimized = false) {
1515
const splash = new BrowserWindow({
1616
...SplashProps,
17-
icon: ICON_PATH,
1817
show: !startMinimized
1918
});
2019

src/shared/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ import { join } from "path";
99
export const STATIC_DIR = /* @__PURE__ */ join(__dirname, "..", "..", "static");
1010
export const VIEW_DIR = /* @__PURE__ */ join(STATIC_DIR, "views");
1111
export const BADGE_DIR = /* @__PURE__ */ join(STATIC_DIR, "badges");
12-
export const ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "icon.png");
12+
export const TRAY_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "tray.png");

static/icon.ico

-12.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)