fix(electron): menu item position on Mac when fullscreen (#6200)

fix https://github.com/toeverything/AFFiNE/issues/6155
This commit is contained in:
EYHN
2024-03-20 16:45:14 +00:00
parent 3edf32b1df
commit 08b610bbad

View File

@@ -1,5 +1,5 @@
import { cssVar } from '@toeverything/theme'; import { cssVar } from '@toeverything/theme';
import { style } from '@vanilla-extract/css'; import { globalStyle, style } from '@vanilla-extract/css';
export const floatingMaxWidth = 768; export const floatingMaxWidth = 768;
export const navWrapperStyle = style({ export const navWrapperStyle = style({
zIndex: 3, zIndex: 3,
@@ -42,12 +42,16 @@ export const navHeaderStyle = style({
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
['WebkitAppRegion' as string]: 'drag', ['WebkitAppRegion' as string]: 'drag',
selectors: {
'&[data-is-macos-electron="true"]': {
paddingLeft: '90px',
},
},
}); });
globalStyle(
`html[data-maximized="false"]
${navHeaderStyle}[data-is-macos-electron="true"]`,
{
paddingLeft: '90px',
}
);
export const navBodyStyle = style({ export const navBodyStyle = style({
flex: '1 1 auto', flex: '1 1 auto',
height: 'calc(100% - 52px)', height: 'calc(100% - 52px)',