mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(electron): disable mica for windows for now (#6165)
Upstream https://github.com/electron/electron/issues/41073
This commit is contained in:
@@ -252,7 +252,7 @@ export function registerAffineSettingsCommands({
|
||||
]()}`,
|
||||
category: 'affine:settings',
|
||||
icon: <SettingsIcon />,
|
||||
preconditionStrategy: () => environment.isDesktop,
|
||||
preconditionStrategy: () => environment.isDesktop && environment.isMacOs,
|
||||
run() {
|
||||
store.set(appSettingAtom, prev => ({
|
||||
...prev,
|
||||
|
||||
@@ -11,7 +11,9 @@ export const AppContainer = (props: WorkspaceRootProps) => {
|
||||
<AppContainerWithoutSettings
|
||||
useNoisyBackground={appSettings.enableNoisyBackground}
|
||||
useBlurBackground={
|
||||
appSettings.enableBlurBackground && environment.isDesktop
|
||||
appSettings.enableBlurBackground &&
|
||||
environment.isDesktop &&
|
||||
environment.isMacOs
|
||||
}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -211,7 +211,7 @@ export const AppearanceSettings = () => {
|
||||
}
|
||||
/>
|
||||
</SettingRow>
|
||||
{
|
||||
{environment.isMacOs && (
|
||||
<SettingRow
|
||||
name={t['com.affine.appearanceSettings.translucentUI.title']()}
|
||||
desc={t[
|
||||
@@ -225,7 +225,7 @@ export const AppearanceSettings = () => {
|
||||
}
|
||||
/>
|
||||
</SettingRow>
|
||||
}
|
||||
)}
|
||||
</SettingWrapper>
|
||||
) : null}
|
||||
</>
|
||||
|
||||
@@ -169,7 +169,11 @@ export const RootAppSidebar = ({
|
||||
return (
|
||||
<AppSidebar
|
||||
hasBackground={
|
||||
!(appSettings.enableBlurBackground && environment.isDesktop)
|
||||
!(
|
||||
appSettings.enableBlurBackground &&
|
||||
environment.isDesktop &&
|
||||
environment.isMacOs
|
||||
)
|
||||
}
|
||||
>
|
||||
<MoveToTrash.ConfirmModal
|
||||
|
||||
@@ -54,7 +54,7 @@ async function createWindow(additionalArguments: string[]) {
|
||||
minHeight: 480,
|
||||
visualEffectState: 'active',
|
||||
vibrancy: 'under-window',
|
||||
backgroundMaterial: 'mica',
|
||||
// backgroundMaterial: 'mica',
|
||||
height: mainWindowState.height,
|
||||
show: false, // Use 'ready-to-show' event to show window
|
||||
webPreferences: {
|
||||
@@ -117,15 +117,18 @@ async function createWindow(additionalArguments: string[]) {
|
||||
|
||||
browserWindow.on('maximize', () => {
|
||||
uiSubjects.onMaximized.next(true);
|
||||
browserWindow.setBackgroundMaterial('none');
|
||||
});
|
||||
|
||||
// full-screen == maximized in UI on windows
|
||||
browserWindow.on('enter-full-screen', () => {
|
||||
uiSubjects.onMaximized.next(true);
|
||||
browserWindow.setBackgroundMaterial('none');
|
||||
});
|
||||
|
||||
browserWindow.on('unmaximize', () => {
|
||||
uiSubjects.onMaximized.next(false);
|
||||
browserWindow.setBackgroundMaterial('none');
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user