From 350b0524d0dc6ba6af3502ca63a313a11d6680ae Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 30 Dec 2024 06:00:36 +0900 Subject: [PATCH] Fix: Tabbar - Windows accent color #1030 --- css/leptonChrome.css | 48 ++++++++++++++-------- css/leptonChromeESR.css | 24 +++++++---- src/tabbar/layout/_window_control.scss | 2 +- src/theme/system_default_theme/_win10.scss | 3 +- 4 files changed, 51 insertions(+), 26 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 9c5607e..1257d72 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -802,16 +802,24 @@ /* Tab Bar */ :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) + .browser-titlebar, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) - .titlebar-color { + .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) + .browser-titlebar { color: AccentColorText; background-color: AccentColor; } @supports -moz-bool-pref("userChrome.compatibility.accent_color") { :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) + .browser-titlebar, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) - .titlebar-color { + .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) + .browser-titlebar { color: -moz-accent-color-foreground; background-color: -moz-accent-color; } @@ -5478,7 +5486,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -5642,7 +5650,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -5803,7 +5811,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -5973,7 +5981,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6150,7 +6158,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6313,7 +6321,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -14856,8 +14864,12 @@ /* Tab Bar */ :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) + .browser-titlebar, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) - .titlebar-color { + .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) + .browser-titlebar { color: AccentColorText; background-color: AccentColor; } @@ -14865,8 +14877,12 @@ @media (-moz-bool-pref: "userChrome.theme.system_default") and (-moz-windows-accent-color-in-titlebar) and (-moz-bool-pref: "userChrome.compatibility.accent_color") { :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) + .browser-titlebar, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) - .titlebar-color { + .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) + .browser-titlebar { color: -moz-accent-color-foreground; background-color: -moz-accent-color; } @@ -19839,7 +19855,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -20079,7 +20095,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -20286,7 +20302,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -20523,7 +20539,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -20763,7 +20779,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -20970,7 +20986,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } diff --git a/css/leptonChromeESR.css b/css/leptonChromeESR.css index ab879c4..1117a55 100644 --- a/css/leptonChromeESR.css +++ b/css/leptonChromeESR.css @@ -1024,16 +1024,24 @@ /* Tab Bar */ :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) + .browser-titlebar, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) - .titlebar-color { + .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) + .browser-titlebar { color: AccentColorText; background-color: AccentColor; } @supports -moz-bool-pref("userChrome.compatibility.accent_color") { :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive):is(:not([lwtheme]), :not(:-moz-lwtheme)) + .browser-titlebar, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) - .titlebar-color { + .titlebar-color, + :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) + .browser-titlebar { color: -moz-accent-color-foreground; background-color: -moz-accent-color; } @@ -5866,7 +5874,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6036,7 +6044,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6203,7 +6211,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6380,7 +6388,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6564,7 +6572,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } @@ -6734,7 +6742,7 @@ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } diff --git a/src/tabbar/layout/_window_control.scss b/src/tabbar/layout/_window_control.scss index 6408745..374544a 100644 --- a/src/tabbar/layout/_window_control.scss +++ b/src/tabbar/layout/_window_control.scss @@ -66,7 +66,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="maximized"]:is([tabsintitlebar], [customtitlebar]) #titlebar { appearance: none !important; } - .browser-toolbar:not(.titlebar-color) { + .browser-toolbar:not(.titlebar-color):not(.browser-titlebar) { background-clip: border-box !important; } } diff --git a/src/theme/system_default_theme/_win10.scss b/src/theme/system_default_theme/_win10.scss index be2e1af..a1f7c33 100644 --- a/src/theme/system_default_theme/_win10.scss +++ b/src/theme/system_default_theme/_win10.scss @@ -373,7 +373,8 @@ /* Tab Bar */ :root:is([tabsintitlebar], [customtitlebar]):not(:-moz-window-inactive)#{$not_lwtheme}, :root:is([tabsintitlebar], [customtitlebar])[lwt-default-theme-in-dark-mode]:not(:-moz-window-inactive) { - .titlebar-color { + .titlebar-color, + .browser-titlebar { @include AccentColor { color: $accentTextColor; background-color: $accentColor; // TODO: Use $accentBorder