From ae974b06b6b6f4413ab180ef9309e406eda7b412 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 20 Apr 2024 23:34:10 +0900 Subject: [PATCH] Fix: Theme - Windows system dark theme separator --- css/leptonChrome.css | 6 ++++-- css/leptonChromeESR.css | 6 +++++- src/theme/system_default_theme/_win10.scss | 9 ++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 436e934..057d1fd 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -576,7 +576,8 @@ --panel-separator-color: var(--win-bgcolor) !important; } } - @media (-moz-platform: windows) { + @media (-moz-platform: windows) and (prefers-color-scheme: dark) { + :root:is(#main-window):is(:not([lwtheme]), :not(:-moz-lwtheme)), :root[lwt-default-theme-in-dark-mode] { --arrowpanel-border-color: var(--win-border-color) !important; --panel-separator-color: var(--win-border-color) !important; @@ -14070,7 +14071,8 @@ --panel-separator-color: var(--win-bgcolor) !important; } } -@media (-moz-bool-pref: "userChrome.theme.system_default") and (-moz-platform: windows) { +@media (-moz-bool-pref: "userChrome.theme.system_default") and (-moz-platform: windows) and (prefers-color-scheme: dark) { + :root:is(#main-window):is(:not([lwtheme]), :not(:-moz-lwtheme)), :root[lwt-default-theme-in-dark-mode] { --arrowpanel-border-color: var(--win-border-color) !important; --panel-separator-color: var(--win-border-color) !important; diff --git a/css/leptonChromeESR.css b/css/leptonChromeESR.css index 150687c..483b28c 100644 --- a/css/leptonChromeESR.css +++ b/css/leptonChromeESR.css @@ -788,7 +788,11 @@ --panel-separator-color: var(--win-bgcolor) !important; } } - @media (-moz-os-version: windows-win10), (-moz-platform: windows-win10) { + @media (-moz-os-version: windows-win10) and (-moz-toolbar-prefers-color-scheme: dark), + (-moz-os-version: windows-win10) and (prefers-color-scheme: dark), + (-moz-platform: windows-win10) and (-moz-toolbar-prefers-color-scheme: dark), + (-moz-platform: windows-win10) and (prefers-color-scheme: dark) { + :root:is(#main-window):is(:not([lwtheme]), :not(:-moz-lwtheme)), :root[lwt-default-theme-in-dark-mode] { --arrowpanel-border-color: var(--win-border-color) !important; --panel-separator-color: var(--win-border-color) !important; diff --git a/src/theme/system_default_theme/_win10.scss b/src/theme/system_default_theme/_win10.scss index 43b925f..3d9c7e8 100644 --- a/src/theme/system_default_theme/_win10.scss +++ b/src/theme/system_default_theme/_win10.scss @@ -234,9 +234,12 @@ --arrowpanel-border-color: var(--win-bgcolor) !important; --panel-separator-color: var(--win-bgcolor) !important; } - :root[lwt-default-theme-in-dark-mode] { - --arrowpanel-border-color: var(--win-border-color) !important; - --panel-separator-color: var(--win-border-color) !important; + @include Dark { + :root:is(#main-window)#{$not_lwtheme}, + :root[lwt-default-theme-in-dark-mode] { + --arrowpanel-border-color: var(--win-border-color) !important; + --panel-separator-color: var(--win-border-color) !important; + } } @include Option("userChrome.theme.system_default") {