From 9baf0f772e1983c29daa3c33d414a940c53085e5 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sat, 12 Oct 2024 13:33:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=91=E6=9A=97=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E5=90=AF=E5=8A=A8=E9=A1=B5=E6=98=AF=E7=99=BD=E8=89=B2?= =?UTF-8?q?=E7=9A=84=20#118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #118 --- src/main/window.ts | 5 ++- src/renderer/index.html | 72 ++++++++++++++++++++++------------------- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/main/window.ts b/src/main/window.ts index c0128df8..dc097273 100644 --- a/src/main/window.ts +++ b/src/main/window.ts @@ -16,6 +16,8 @@ export function createMainWindow() { const theme = appConfig.get('theme') || 'light' // Create the browser window. + const isMac = process.platform === 'darwin' + const mainWindow = new BrowserWindow({ x: mainWindowState.x, y: mainWindowState.y, @@ -25,11 +27,12 @@ export function createMainWindow() { minHeight: 600, show: true, autoHideMenuBar: true, - transparent: process.platform === 'darwin', + transparent: isMac, vibrancy: 'fullscreen-ui', visualEffectState: 'active', titleBarStyle: 'hidden', titleBarOverlay: theme === 'dark' ? titleBarOverlayDark : titleBarOverlayLight, + backgroundColor: isMac ? undefined : theme === 'dark' ? '#181818' : '#FFFFFF', trafficLightPosition: { x: 8, y: 12 }, ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { diff --git a/src/renderer/index.html b/src/renderer/index.html index 261102d1..c8ed1700 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -1,36 +1,40 @@ - - - - - - - -
-
- -
- - - + + + + + + + + + +
+
+ +
+ + + + \ No newline at end of file