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:
@@ -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',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user