fix: reorder mac transparent window check in useNavBackgroundColor hook

- Moved the check for macTransparentWindow to ensure it is evaluated after minappShow, maintaining the intended logic for background color selection.
This commit is contained in:
kangfenmao 2025-03-19 16:10:43 +08:00
parent 530bf42abb
commit 9ca46ee3d3

View File

@ -11,14 +11,14 @@ function useNavBackgroundColor() {
const macTransparentWindow = isMac && windowStyle === 'transparent' const macTransparentWindow = isMac && windowStyle === 'transparent'
if (macTransparentWindow) {
return 'transparent'
}
if (minappShow) { if (minappShow) {
return theme === 'dark' ? 'var(--navbar-background)' : 'var(--color-white)' return theme === 'dark' ? 'var(--navbar-background)' : 'var(--color-white)'
} }
if (macTransparentWindow) {
return 'transparent'
}
return 'var(--navbar-background)' return 'var(--navbar-background)'
} }