fix: some style issues to sidebar and switch (#4046)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-08-31 20:46:06 +08:00
committed by GitHub
parent 260c25acf3
commit 13857d59dc
16 changed files with 91 additions and 55 deletions

View File

@@ -11,7 +11,11 @@ export const AppContainer = (props: WorkspaceRootProps) => {
return (
<AppContainerWithoutSettings
useNoisyBackground={appSettings.enableNoisyBackground}
useBlurBackground={!appSettings.enableBlurBackground}
useBlurBackground={
appSettings.enableBlurBackground &&
environment.isDesktop &&
environment.isMacOs
}
{...props}
/>
);

View File

@@ -212,17 +212,19 @@ export const AppearanceSettings = () => {
}
/>
</SettingRow>
<SettingRow
name={t['com.affine.settings.translucent-style']()}
desc={t['com.affine.settings.translucent-style-description']()}
>
<Switch
checked={appSettings.enableBlurBackground}
onChange={checked =>
changeSwitch('enableBlurBackground', checked)
}
/>
</SettingRow>
{environment.isMacOs && (
<SettingRow
name={t['com.affine.settings.translucent-style']()}
desc={t['com.affine.settings.translucent-style-description']()}
>
<Switch
checked={appSettings.enableBlurBackground}
onChange={checked =>
changeSwitch('enableBlurBackground', checked)
}
/>
</SettingRow>
)}
</SettingWrapper>
) : null}
</>

View File

@@ -123,8 +123,8 @@ globalStyle(`${accountButton} .avatar.not-sign`, {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
borderColor: 'var(--affine-border-color)',
color: 'var(--affine-border-color)',
borderColor: 'var(--affine-icon-secondary)',
color: 'var(--affine-icon-secondary)',
background: 'var(--affine-white)',
});
globalStyle(`${accountButton} .content`, {