Use platform-specific app icon in createWindow

Updated the window icon path to use a .icns file on macOS and a .png file on other platforms. This ensures proper icon display across different operating systems.
This commit is contained in:
2025-07-28 10:47:48 +12:00
parent afa25a113d
commit c6a77f1096
+5 -1
View File
@@ -24,6 +24,8 @@ ipcMain.removeHandler('window-minimize');
ipcMain.removeHandler('window-maximize'); ipcMain.removeHandler('window-maximize');
ipcMain.removeHandler('window-close'); ipcMain.removeHandler('window-close');
function createWindow(startUrl) { function createWindow(startUrl) {
// Get the available screen size // Get the available screen size
const { width, height } = screen.getPrimaryDisplay().workAreaSize; const { width, height } = screen.getPrimaryDisplay().workAreaSize;
@@ -51,7 +53,9 @@ function createWindow(startUrl) {
}, },
fullscreen: false, fullscreen: false,
autoHideMenuBar: true, autoHideMenuBar: true,
icon: path.join(__dirname, 'assets/images/Logos/Nebula-favicon.png'), icon: process.platform === 'darwin'
? path.join(__dirname, 'assets/images/Logos/Nebula-Favicon.icns')
: path.join(__dirname, 'assets/images/Logos/Nebula-favicon.png'),
title: 'Nebula', title: 'Nebula',
}; };