mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 11:44:28 +08:00
refactor(WindowService): 更新窗口服务配置,优化背景材质和透明度设置
This commit is contained in:
parent
3d9236a09a
commit
38eb206a8a
@ -60,9 +60,10 @@ export class WindowService {
|
||||
transparent: false,
|
||||
vibrancy: 'sidebar',
|
||||
visualEffectState: 'active',
|
||||
backgroundMaterial: isWin ? 'acrylic' : undefined,
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: nativeTheme.shouldUseDarkColors ? titleBarOverlayDark : titleBarOverlayLight,
|
||||
backgroundColor: isMac ? undefined : nativeTheme.shouldUseDarkColors ? '#181818' : '#FFFFFF',
|
||||
backgroundColor: undefined,
|
||||
darkTheme: nativeTheme.shouldUseDarkColors,
|
||||
trafficLightPosition: { x: 12, y: 12 },
|
||||
...(isLinux ? { icon } : {}),
|
||||
@ -427,8 +428,9 @@ export class WindowService {
|
||||
show: false,
|
||||
autoHideMenuBar: true,
|
||||
transparent: isMac,
|
||||
vibrancy: 'under-window',
|
||||
visualEffectState: 'followWindow',
|
||||
vibrancy: isMac ? 'under-window' : undefined,
|
||||
visualEffectState: isMac ? 'followWindow' : undefined,
|
||||
backgroundMaterial: isWin ? 'acrylic' : undefined,
|
||||
center: true,
|
||||
frame: false,
|
||||
alwaysOnTop: true,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { isMac } from '@renderer/config/constant'
|
||||
import { isLocalAi } from '@renderer/config/env'
|
||||
import { useTheme } from '@renderer/context/ThemeProvider'
|
||||
import db from '@renderer/databases'
|
||||
@ -63,10 +62,10 @@ export function useAppInit() {
|
||||
}, [language])
|
||||
|
||||
useEffect(() => {
|
||||
const transparentWindow = isMac && !minappShow
|
||||
const transparentWindow = !minappShow
|
||||
|
||||
if (minappShow) {
|
||||
window.root.style.background = isMac ? 'var(--color-background)' : 'var(--navbar-background)'
|
||||
window.root.style.background = 'var(--color-background)'
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user