Skip to content

Commit e2a4e91

Browse files
committed
Fix Mac throws crash when quit. Add Mac Dark icons
1 parent 0d0b987 commit e2a4e91

File tree

7 files changed

+6
-167
lines changed

7 files changed

+6
-167
lines changed

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { setTray } = require("./Tray");
99
let splashScreen;
1010
app
1111
.on("ready", () => {
12-
// Splash screen to run in background and keep app alive
12+
// Splash screen which also helps to run in background and keep app alive
1313
splashScreen = new BrowserWindow({
1414
width: 400,
1515
height: 200,

src/Icons.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const { nativeTheme } = require("electron");
23

34
/**
45
* Adds static folder path to image name
@@ -13,7 +14,9 @@ const icons = {
1314
droppointDefaultIcon:
1415
process.platform !== "win32"
1516
? process.platform === "darwin"
16-
? joinStaticPath("pngLogo/droppointMacTemplate.png")
17+
? nativeTheme.shouldUseDarkColors
18+
? joinStaticPath("pngLogo/droppointMacDarkTemplate.png")
19+
: joinStaticPath("pngLogo/droppointMacTemplate.png")
1720
: joinStaticPath("pngLogo/droppoint.png")
1821
: joinStaticPath("droppoint.ico"),
1922
audio: joinStaticPath("audio.png"),

src/Tray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const setTray = () => {
3232
{
3333
label: "Quit",
3434
click: function () {
35-
app.quit();
35+
app.exit();
3636
},
3737
},
3838
])

src/index.js

Lines changed: 0 additions & 164 deletions
This file was deleted.
294 Bytes
Loading
499 Bytes
Loading
825 Bytes
Loading

0 commit comments

Comments
 (0)