mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 03:32:17 +08:00
matches the title bar color
This commit is contained in:
parent
74325f8efa
commit
8636bde9a6
|
@ -96,23 +96,11 @@ const App: React.FC = () => {
|
||||||
}
|
}
|
||||||
setTheme(appTheme)
|
setTheme(appTheme)
|
||||||
if (!useWindowFrame) {
|
if (!useWindowFrame) {
|
||||||
let theme = appTheme as string
|
|
||||||
if (appTheme === 'system') {
|
|
||||||
theme = systemTheme || 'light'
|
|
||||||
}
|
|
||||||
const options = { height: 48 } as TitleBarOverlayOptions
|
const options = { height: 48 } as TitleBarOverlayOptions
|
||||||
try {
|
try {
|
||||||
if (platform !== 'darwin') {
|
if (platform !== 'darwin') {
|
||||||
if (theme.includes('light')) {
|
options.color = window.getComputedStyle(document.documentElement).backgroundColor
|
||||||
options.color = '#FFFFFF'
|
options.symbolColor = window.getComputedStyle(document.documentElement).color
|
||||||
options.symbolColor = '#000000'
|
|
||||||
} else if (theme.includes('dark')) {
|
|
||||||
options.color = '#000000'
|
|
||||||
options.symbolColor = '#FFFFFF'
|
|
||||||
} else {
|
|
||||||
options.color = '#18181b'
|
|
||||||
options.symbolColor = '#FFFFFF'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
setTitleBarOverlay(options)
|
setTitleBarOverlay(options)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user