From f4efefe480f63680e67ded31909149651cdd07bc Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 9 Dec 2024 21:54:11 +0200 Subject: [PATCH] feat(mica): add back toggleable --- src/public/stylesheets/theme-next.css | 16 ++++++++-------- src/routes/index.ts | 1 + src/views/desktop.ejs | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/public/stylesheets/theme-next.css b/src/public/stylesheets/theme-next.css index 20d6ffac6..39fd64cb4 100644 --- a/src/public/stylesheets/theme-next.css +++ b/src/public/stylesheets/theme-next.css @@ -413,7 +413,7 @@ body.layout-horizontal { } /* #region Mica */ -body.electron.platform-win32 { +body.background-effects.platform-win32 { --launcher-pane-horizontal-border-color: rgba(0, 0, 0, 0.15); --launcher-pane-background-color: rgba(255, 255, 255, 0.7); --tab-background-color: transparent; @@ -424,27 +424,27 @@ body.electron.platform-win32 { } @media (prefers-color-scheme: dark) { - body.electron.platform-win32 { + body.background-effects.platform-win32 { --launcher-pane-horizontal-border-color: rgba(0, 0, 0, 0.5); --launcher-pane-background-color: rgba(255, 255, 255, 0.09); } } -body.electron.platform-win32.layout-vertical { +body.background-effects.platform-win32.layout-vertical { --left-pane-background-color: transparent; --launcher-pane-background-color: rgba(255, 255, 255, 0.055); --left-pane-item-hover-background: rgba(127, 127, 127, 0.05); --background-material: mica; } -body.electron.platform-win32, -body.electron.platform-win32 #root-widget, -body.electron.platform-win32 #launcher-pane .launcher-button { +body.background-effects.platform-win32, +body.background-effects.platform-win32 #root-widget, +body.background-effects.platform-win32 #launcher-pane .launcher-button { background: transparent !important; } -body.electron.platform-win32.layout-horizontal #horizontal-main-container, -body.electron.platform-win32.layout-vertical #vertical-main-container { +body.background-effects.platform-win32.layout-horizontal #horizontal-main-container, +body.background-effects.platform-win32.layout-vertical #vertical-main-container { background-color: var(--root-background); } /* #endregion */ diff --git a/src/routes/index.ts b/src/routes/index.ts index 60caf7ccc..8dda180f6 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -37,6 +37,7 @@ function index(req: Request, res: Response) { platform: process.platform, isElectron, hasNativeTitleBar: (isElectron && options.nativeTitleBarVisible === "true"), + hasBackgroundEffects: (isElectron && true), mainFontSize: parseInt(options.mainFontSize), treeFontSize: parseInt(options.treeFontSize), detailFontSize: parseInt(options.detailFontSize), diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index 29afdcfd3..2de4a1817 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -6,7 +6,7 @@ TriliumNext Notes - +