mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 20:12:38 +08:00
refactor(WindowService, ThemeProvider): streamline title bar style and theme toggling logic (#5633)
* fix(config): update title bar overlay colors for better visibility * fix(Navbar): add Linux support for padding adjustment in Navbar component
This commit is contained in:
parent
6e9bde6b6d
commit
3718b86044
@ -12,12 +12,12 @@ export const DATA_PATH = getDataPath()
|
||||
|
||||
export const titleBarOverlayDark = {
|
||||
height: 40,
|
||||
color: 'rgba(0,0,0,0)',
|
||||
symbolColor: '#ffffff'
|
||||
color: 'rgba(255,255,255,0)',
|
||||
symbolColor: '#fff'
|
||||
}
|
||||
|
||||
export const titleBarOverlayLight = {
|
||||
height: 40,
|
||||
color: 'rgba(255,255,255,0)',
|
||||
symbolColor: '#000000'
|
||||
symbolColor: '#000'
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ export class WindowService {
|
||||
transparent: isMac,
|
||||
vibrancy: 'sidebar',
|
||||
visualEffectState: 'active',
|
||||
titleBarStyle: isLinux ? 'default' : 'hidden',
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: nativeTheme.shouldUseDarkColors ? titleBarOverlayDark : titleBarOverlayLight,
|
||||
backgroundColor: isMac ? undefined : nativeTheme.shouldUseDarkColors ? '#181818' : '#FFFFFF',
|
||||
darkTheme: nativeTheme.shouldUseDarkColors,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { isMac, isWindows } from '@renderer/config/constant'
|
||||
import { isLinux, isMac, isWindows } from '@renderer/config/constant'
|
||||
import useNavBackgroundColor from '@renderer/hooks/useNavBackgroundColor'
|
||||
import type { FC, PropsWithChildren } from 'react'
|
||||
import type { HTMLAttributes } from 'react'
|
||||
@ -63,6 +63,6 @@ const NavbarRightContainer = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 12px;
|
||||
padding-right: ${isWindows ? '140px' : 12};
|
||||
padding-right: ${isWindows ? '140px' : isLinux ? '120px' : '12px'};
|
||||
justify-content: flex-end;
|
||||
`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user