Skip to content

Commit

Permalink
New Vesktop Icon
Browse files Browse the repository at this point in the history
feedback welcome.

Also cleaned up icons and removed dynamically setting the icon (electron builder handles this)
  • Loading branch information
Covkie committed Sep 19, 2024
1 parent 24fbf35 commit fc5a3e8
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 15 deletions.
Binary file modified build/icon.icns
Binary file not shown.
Binary file added build/icon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
],
"beforePack": "scripts/build/sandboxFix.js",
"linux": {
"icon": "build/icon.icns",
"icon": "build/icon.svg",
"category": "Network",
"maintainer": "vendicated+vesktop@riseup.net",
"target": [
Expand Down Expand Up @@ -160,6 +160,7 @@
"oneClick": false
},
"win": {
"icon": "build/icon.ico",
"target": [
{
"target": "nsis",
Expand All @@ -181,9 +182,9 @@
"provider": "github"
},
"rpm": {
"fpm": [
"fpm": [
"--rpm-rpmbuild-define=_build_id_links none"
]
]
}
},
"pnpm": {
Expand All @@ -192,4 +193,3 @@
}
}
}

3 changes: 1 addition & 2 deletions src/main/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

import { BrowserWindow } from "electron";
import { join } from "path";
import { ICON_PATH, VIEW_DIR } from "shared/paths";
import { VIEW_DIR } from "shared/paths";

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

export function createAboutWindow() {
const about = new BrowserWindow({
center: true,
autoHideMenuBar: true,
icon: ICON_PATH,
webPreferences: {
preload: join(__dirname, "updaterPreload.js")
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/firstLaunch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BrowserWindow } from "electron/main";
import { copyFileSync, mkdirSync, readdirSync } from "fs";
import { join } from "path";
import { SplashProps } from "shared/browserWinProperties";
import { ICON_PATH, VIEW_DIR } from "shared/paths";
import { VIEW_DIR } from "shared/paths";

import { autoStart } from "./autoStart";
import { DATA_DIR } from "./constants";
Expand All @@ -31,8 +31,7 @@ export function createFirstLaunchTour() {
frame: true,
autoHideMenuBar: true,
height: 470,
width: 550,
icon: ICON_PATH
width: 550
});

makeLinksOpenExternally(win);
Expand Down
5 changes: 2 additions & 3 deletions src/main/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { isTruthy } from "shared/utils/guards";
import { once } from "shared/utils/once";
import type { SettingsStore } from "shared/utils/SettingsStore";

import { ICON_PATH } from "../shared/paths";
import { TRAY_ICON_PATH } from "../shared/paths";
import { createAboutWindow } from "./about";
import { initArRPC } from "./arrpc";
import {
Expand Down Expand Up @@ -123,7 +123,7 @@ function initTray(win: BrowserWindow) {
}
]);

tray = new Tray(ICON_PATH);
tray = new Tray(TRAY_ICON_PATH);
tray.setToolTip("Vesktop");
tray.setContextMenu(trayMenu);
tray.on("click", onTrayClick);
Expand Down Expand Up @@ -407,7 +407,6 @@ function createMainWindow() {
// disable renderer backgrounding to prevent the app from unloading when in the background
backgroundThrottling: false
},
icon: ICON_PATH,
frame: !noFrame,
...(transparent && {
transparent: true,
Expand Down
3 changes: 1 addition & 2 deletions src/main/splash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
import { BrowserWindow } from "electron";
import { join } from "path";
import { SplashProps } from "shared/browserWinProperties";
import { ICON_PATH, VIEW_DIR } from "shared/paths";
import { VIEW_DIR } from "shared/paths";

import { Settings } from "./settings";

export function createSplashWindow(startMinimized = false) {
const splash = new BrowserWindow({
...SplashProps,
icon: ICON_PATH,
show: !startMinimized
});

Expand Down
2 changes: 1 addition & 1 deletion src/shared/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import { join } from "path";
export const STATIC_DIR = /* @__PURE__ */ join(__dirname, "..", "..", "static");
export const VIEW_DIR = /* @__PURE__ */ join(STATIC_DIR, "views");
export const BADGE_DIR = /* @__PURE__ */ join(STATIC_DIR, "badges");
export const ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "icon.png");
export const TRAY_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "tray.png");
Binary file removed static/icon.ico
Binary file not shown.
Binary file removed static/icon.png
Binary file not shown.
File renamed without changes

0 comments on commit fc5a3e8

Please sign in to comment.