From 8636bde9a651c0d8f9343de9d5d6ab7e55d61a0e Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Fri, 20 Sep 2024 10:59:37 +0800 Subject: [PATCH] matches the title bar color --- src/renderer/src/App.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 84e01ae..932e2a5 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -96,23 +96,11 @@ const App: React.FC = () => { } setTheme(appTheme) if (!useWindowFrame) { - let theme = appTheme as string - if (appTheme === 'system') { - theme = systemTheme || 'light' - } const options = { height: 48 } as TitleBarOverlayOptions try { if (platform !== 'darwin') { - if (theme.includes('light')) { - options.color = '#FFFFFF' - options.symbolColor = '#000000' - } else if (theme.includes('dark')) { - options.color = '#000000' - options.symbolColor = '#FFFFFF' - } else { - options.color = '#18181b' - options.symbolColor = '#FFFFFF' - } + options.color = window.getComputedStyle(document.documentElement).backgroundColor + options.symbolColor = window.getComputedStyle(document.documentElement).color } setTitleBarOverlay(options) } catch (e) {