fix: Fixed issue on desktop where custom titlebar would overlap with preferences view header

This commit is contained in:
Aman Harwara
2023-04-21 19:21:00 +05:30
parent ab5b292364
commit 87cd75d324
4 changed files with 42 additions and 37 deletions

View File

@@ -114,18 +114,6 @@ async function configureWindow(remoteBridge: CrossProcessBridge) {
if (isMacOS || useSystemMenuBar) {
// !important is important here because #desktop-title-bar has display: flex.
sheet.insertRule('#desktop-title-bar { display: none !important; }', sheet.cssRules.length)
} else {
/* Use custom title bar. Take the sn-titlebar-height off of
the app content height so its not overflowing */
sheet.insertRule(
'body, [data-dialog], [data-mobile-popover] { padding-top: var(--sn-desktop-titlebar-height) !important; }',
sheet.cssRules.length,
)
sheet.insertRule(
`.main-ui-view { height: calc(100vh - var(--sn-desktop-titlebar-height)) !important;
min-height: calc(100vh - var(--sn-desktop-titlebar-height)) !important; }`,
sheet.cssRules.length,
)
}
}