Skip to content

Build your personal knowledge base with Trilium Notes

feat(desktop): handle both vertical and horizontal layouts

Elian Doran3c8a066f7605
diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css
index 483b117d52..1dd2432f72 100644
--- a/apps/client/src/stylesheets/theme-next/shell.css
+++ b/apps/client/src/stylesheets/theme-next/shell.css
@@ -40,14 +40,27 @@ body.mobile {
/* #region Mica */
+/* Quirk: --background-material is read before "theme-supports-background-effects" class
+ * is applied. Apply the matterial even if the theme doesn't support it. */
body.background-effects.platform-win32 {
- /* Quirk: --background-material is read before "theme-supports-background-effects" class
- * is applied. Apply the matterial even if the theme doesn't support it. */
- --background-material: tabbed;
+ &.layout-vertical {
+ --background-material: mica;
+ }
+
+ &.layout-horizontal {
+ --background-material: tabbed;
+ }
}
body.background-effects.platform-darwin {
- --background-material: under-window;
+ /** Reference: https://developer.apple.com/documentation/appkit/nsvisualeffectview?preferredLanguage=objc **/
+ &.layout-vertical {
+ --background-material: under-window;
+ }
+
+ &.layout-horizontal {
+ --background-material: header;
+ }
}
body.background-effects.theme-supports-background-effects {
@@ -60,10 +73,6 @@ body.background-effects.theme-supports-background-effects {
--root-background: transparent;
}
-body.background-effects.platform-win32.layout-vertical {
- --background-material: mica;
-}
-
body.background-effects.theme-supports-background-effects.layout-vertical {
--left-pane-background-color: var(--window-background-color-bgfx);
--center-pane-background-color-bgfx: var(--center-pane-vert-layout-background-color-bgfx);