diff --git a/apps/desktop/forge.config.ts b/apps/desktop/forge.config.ts index bb6b15028..8d96eec5f 100644 --- a/apps/desktop/forge.config.ts +++ b/apps/desktop/forge.config.ts @@ -65,7 +65,8 @@ const config: ForgeConfig = { name: 'Tonkeeper', authors: 'Ton Apps Group', description: 'Your desktop wallet on The Open Network', - iconUrl: path.join(__dirname, 'public', 'icon.png') + iconUrl: path.join(process.cwd(), 'public', 'icon.ico'), + setupIcon: path.join(process.cwd(), 'public', 'icon.ico') }, ['win32'] ), diff --git a/apps/desktop/public/icon.ico b/apps/desktop/public/icon.ico new file mode 100644 index 000000000..98be3cee3 Binary files /dev/null and b/apps/desktop/public/icon.ico differ diff --git a/apps/desktop/src/electron/mainWindow.ts b/apps/desktop/src/electron/mainWindow.ts index 35f7c4d25..d353df957 100644 --- a/apps/desktop/src/electron/mainWindow.ts +++ b/apps/desktop/src/electron/mainWindow.ts @@ -19,20 +19,26 @@ export abstract class MainWindow { const icon = (() => { switch (process.platform) { - case "darwin": return path.join(process.cwd(), "public", "icon.icns") - case "linux": return path.join(__dirname, "../../../", "public", 'icon.png') - default: return ""; + case 'darwin': + return path.join(process.cwd(), 'public', 'icon.icns'); + case 'linux': + return path.join(__dirname, '../../../', 'public', 'icon.png'); + case 'win32': + return path.join(process.cwd(), 'public', 'icon.ico'); + default: + return ''; } })(); // Create the browser window. this.mainWindow = new BrowserWindow({ icon: icon, - width: process.platform == "linux" ? 438 : 450, + width: process.platform == 'linux' ? 438 : 450, height: 700, resizable: isDev, + autoHideMenuBar: process.platform != 'darwin', webPreferences: { - zoomFactor: process.platform === 'darwin' ? 0.8 : undefined, + zoomFactor: process.platform !== 'linux' ? 0.8 : undefined, preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY } });