mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 06:49:02 +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
5985946c2a
commit
9e86cc9bfb
@ -12,12 +12,12 @@ export const DATA_PATH = getDataPath()
|
|||||||
|
|
||||||
export const titleBarOverlayDark = {
|
export const titleBarOverlayDark = {
|
||||||
height: 40,
|
height: 40,
|
||||||
color: 'rgba(0,0,0,0)',
|
color: 'rgba(255,255,255,0)',
|
||||||
symbolColor: '#ffffff'
|
symbolColor: '#fff'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const titleBarOverlayLight = {
|
export const titleBarOverlayLight = {
|
||||||
height: 40,
|
height: 40,
|
||||||
color: 'rgba(255,255,255,0)',
|
color: 'rgba(255,255,255,0)',
|
||||||
symbolColor: '#000000'
|
symbolColor: '#000'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ export class WindowService {
|
|||||||
transparent: isMac,
|
transparent: isMac,
|
||||||
vibrancy: 'sidebar',
|
vibrancy: 'sidebar',
|
||||||
visualEffectState: 'active',
|
visualEffectState: 'active',
|
||||||
titleBarStyle: isLinux ? 'default' : 'hidden',
|
titleBarStyle: 'hidden',
|
||||||
titleBarOverlay: nativeTheme.shouldUseDarkColors ? titleBarOverlayDark : titleBarOverlayLight,
|
titleBarOverlay: nativeTheme.shouldUseDarkColors ? titleBarOverlayDark : titleBarOverlayLight,
|
||||||
backgroundColor: isMac ? undefined : nativeTheme.shouldUseDarkColors ? '#181818' : '#FFFFFF',
|
backgroundColor: isMac ? undefined : nativeTheme.shouldUseDarkColors ? '#181818' : '#FFFFFF',
|
||||||
darkTheme: nativeTheme.shouldUseDarkColors,
|
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 useNavBackgroundColor from '@renderer/hooks/useNavBackgroundColor'
|
||||||
import type { FC, PropsWithChildren } from 'react'
|
import type { FC, PropsWithChildren } from 'react'
|
||||||
import type { HTMLAttributes } from 'react'
|
import type { HTMLAttributes } from 'react'
|
||||||
@ -63,6 +63,6 @@ const NavbarRightContainer = styled.div`
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
padding-right: ${isWindows ? '140px' : 12};
|
padding-right: ${isWindows ? '140px' : isLinux ? '120px' : '12px'};
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
`
|
`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user