Skip to content

Commit

Permalink
fix icon missing in some windows (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: V <[email protected]>
  • Loading branch information
zyrouge and Vendicated authored Sep 25, 2023
1 parent b876f45 commit 061fec4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 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 { VIEW_DIR } from "shared/paths";
import { ICON_PATH, VIEW_DIR } from "shared/paths";

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

makeLinksOpenExternally(win);
Expand Down
7 changes: 5 additions & 2 deletions src/main/splash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
import { BrowserWindow } from "electron";
import { join } from "path";
import { SplashProps } from "shared/browserWinProperties";
import { VIEW_DIR } from "shared/paths";
import { ICON_PATH, VIEW_DIR } from "shared/paths";

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

splash.loadFile(join(VIEW_DIR, "splash.html"));

Expand Down
5 changes: 3 additions & 2 deletions src/updater/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { makeLinksOpenExternally } from "main/utils/makeLinksOpenExternally";
import { githubGet, ReleaseData } from "main/utils/vencordLoader";
import { join } from "path";
import { IpcEvents } from "shared/IpcEvents";
import { VIEW_DIR } from "shared/paths";
import { ICON_PATH, VIEW_DIR } from "shared/paths";

export interface UpdateData {
currentVersion: string;
Expand Down Expand Up @@ -108,7 +108,8 @@ function openNewUpdateWindow() {
nodeIntegration: false,
contextIsolation: true,
sandbox: true
}
},
icon: ICON_PATH
});

makeLinksOpenExternally(win);
Expand Down

0 comments on commit 061fec4

Please sign in to comment.