diff --git a/common/components/Menubar.svelte b/common/components/Menubar.svelte
index de4de31..02e9725 100644
--- a/common/components/Menubar.svelte
+++ b/common/components/Menubar.svelte
@@ -25,14 +25,10 @@
{/if}
-
- {#if window.version?.platform === 'linux'}
-
IPC.emit('close')}>
-
-
- {/if}
+
+
+
+
{#if $debug}
@@ -51,7 +47,7 @@
transform: translate(-29.3%) rotate(-45deg);
}
.navbar {
- --navbar-height: 28px !important;
+ --navbar-height: 32px !important;
}
.z-101 {
z-index: 101 !important
@@ -66,22 +62,13 @@
top: 0;
-webkit-app-region: no-drag
}
- .close {
- width: 40px;
- }
- .close:hover {
- background-color: #e81123 !important;
- }
svg {
width: 18px;
height: 18px;
width: 100%;
}
- path {
- fill: currentColor;
- }
.navbar {
- left: unset !important
+ left: unset !important;
}
@media (pointer: none), (pointer: coarse) {
.navbar {
@@ -89,4 +76,31 @@
height: 0;
}
}
+ .window-controls {
+ -webkit-app-region: no-drag;
+ backdrop-filter: blur(8px);
+ background: rgba(24, 24, 24, 0.1);
+ }
+ .window-controls .button {
+ background: transparent;
+ width: 46px;
+ height: 32px;
+ user-select: none;
+ }
+ .window-controls .button:hover {
+ background: rgba(128, 128, 128, 0.2);
+ }
+ .window-controls .button:active {
+ background: rgba(128, 128, 128, 0.4);
+ }
+ .close-button:hover {
+ background: #e81123 !important;
+ }
+ .close-button:active {
+ background: #f1707a !important;
+ }
+ .svg-controls {
+ width: 12px;
+ height: 12px;
+ }
diff --git a/electron/src/main/app.js b/electron/src/main/app.js
index 2252770..135896b 100644
--- a/electron/src/main/app.js
+++ b/electron/src/main/app.js
@@ -29,11 +29,6 @@ export default class App {
height: 900,
frame: process.platform === 'darwin', // Only keep the native frame on Mac
titleBarStyle: 'hidden',
- titleBarOverlay: {
- color: '#17191c',
- symbolColor: '#eee',
- height: 28
- },
backgroundColor: '#17191c',
autoHideMenuBar: true,
webPreferences: {
@@ -65,6 +60,11 @@ export default class App {
this.mainWindow.on('closed', () => this.destroy())
this.webtorrentWindow.on('closed', () => this.destroy())
ipcMain.on('close', () => this.destroy())
+ ipcMain.on('minimize', () => this.mainWindow?.minimize())
+ ipcMain.on('maximize', () => {
+ const focusedWindow = this.mainWindow
+ focusedWindow?.isMaximized() ? focusedWindow.unmaximize() : focusedWindow.maximize()
+});
app.on('before-quit', e => {
if (this.destroyed) return
e.preventDefault()
@@ -158,4 +158,4 @@ export default class App {
this.destroyed = true
if (!this.updater.install(forceRunAfter)) app.quit()
}
-}
+}
\ No newline at end of file
diff --git a/electron/src/preload/preload.js b/electron/src/preload/preload.js
index ba05348..17f795c 100644
--- a/electron/src/preload/preload.js
+++ b/electron/src/preload/preload.js
@@ -29,4 +29,4 @@ ipcRenderer.once('port', ({ ports }) => {
ports[0].postMessage(a, b)
}
})
-})
+})
\ No newline at end of file