Skip to content

Commit

Permalink
update: used transparent version of the logo for switching custom tit…
Browse files Browse the repository at this point in the history
…lebar to a native one
  • Loading branch information
roldanjr committed Jun 19, 2020
1 parent 508f31d commit 7c6239b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/electron/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function createMainWindow() {
maximizable: false,
show: false,
frame: hasFrame,
icon: getIcon(isDarkMode),
icon: getIcon(),
backgroundColor: isDarkMode ? "#141e25" : "#fff",
webPreferences: {
contextIsolation: true,
Expand Down
23 changes: 13 additions & 10 deletions app/electron/helpers/getIcon.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import path from "path";

export function getIcon(isDarkMode: boolean) {
export function getIcon() {
switch (process.platform) {
case "darwin":
return isDarkMode
? path.join(__dirname, "../../src/assets/logos/[email protected]")
: path.join(__dirname, "../../src/assets/logos/[email protected]");
return path.join(
__dirname,
"../../src/assets/logos/[email protected]"
);
case "linux":
return isDarkMode
? path.join(__dirname, "../../src/assets/logos/logo-dark.png")
: path.join(__dirname, "../../src/assets/logos/logo-light.png");
return path.join(
__dirname,
"../../src/assets/logos/logo-transparent.png"
);
default:
return isDarkMode
? path.join(__dirname, "../../src/assets/logos/logo-dark.ico")
: path.join(__dirname, "../../src/assets/logos/logo-light.ico");
return path.join(
__dirname,
"../../src/assets/logos/logo-transparent.ico"
);
}
}

0 comments on commit 7c6239b

Please sign in to comment.