From 47b8a94324c98094ebc71aa87a9c527db20199c8 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 7 Sep 2025 22:07:15 +0800 Subject: [PATCH] Fixed #1350 --- other/firefox/Monterey/parts/tabsbar-alt.css | 5 -- other/firefox/Monterey/parts/tabsbar.css | 5 -- .../WhiteSur/parts/tabsbar-adaptive.css | 4 -- other/firefox/WhiteSur/parts/tabsbar.css | 4 -- other/firefox/common/parts/popups.css | 46 ++++++++++++++ src/sass/gtk/_colors-public.scss | 29 ++++++--- src/sass/gtk/_common-4.0.scss | 5 +- src/sass/gtk/apps/_gnome-40.0.scss | 60 ++++++++++--------- 8 files changed, 103 insertions(+), 55 deletions(-) diff --git a/other/firefox/Monterey/parts/tabsbar-alt.css b/other/firefox/Monterey/parts/tabsbar-alt.css index 4b89aa41..fff1317f 100644 --- a/other/firefox/Monterey/parts/tabsbar-alt.css +++ b/other/firefox/Monterey/parts/tabsbar-alt.css @@ -326,11 +326,6 @@ tab[selected]:-moz-window-inactive .tab-label { } } -#TabsToolbar #alltabs-button { - padding: 0 !important; - visibility: collapse !important; -} - #TabsToolbar .toolbarbutton-1, #TabsToolbar #tabs-newtab-button, #TabsToolbar #new-tab-button { diff --git a/other/firefox/Monterey/parts/tabsbar.css b/other/firefox/Monterey/parts/tabsbar.css index 3d32c000..c57e9ef5 100644 --- a/other/firefox/Monterey/parts/tabsbar.css +++ b/other/firefox/Monterey/parts/tabsbar.css @@ -218,11 +218,6 @@ tab[selected]:-moz-window-inactive .tab-label { display: flex; } -#TabsToolbar #alltabs-button { - padding: 0 !important; - visibility: collapse !important; -} - #TabsToolbar .toolbarbutton-1, #TabsToolbar #tabs-newtab-button, #TabsToolbar #new-tab-button { diff --git a/other/firefox/WhiteSur/parts/tabsbar-adaptive.css b/other/firefox/WhiteSur/parts/tabsbar-adaptive.css index 1fdec6ff..5b08da91 100644 --- a/other/firefox/WhiteSur/parts/tabsbar-adaptive.css +++ b/other/firefox/WhiteSur/parts/tabsbar-adaptive.css @@ -278,10 +278,6 @@ toolbarbutton[open=true] { width: 32px !important; height: 32px !important; } - -#alltabs-button { - display: none !important; -} } :root[tabsintitlebar][inFullscreen] #TabsToolbar .toolbar-items { diff --git a/other/firefox/WhiteSur/parts/tabsbar.css b/other/firefox/WhiteSur/parts/tabsbar.css index f7edd37e..fa5268ba 100644 --- a/other/firefox/WhiteSur/parts/tabsbar.css +++ b/other/firefox/WhiteSur/parts/tabsbar.css @@ -272,10 +272,6 @@ width: 32px !important; height: 32px !important; } - - #alltabs-button { - display: none !important; - } } :root[tabsintitlebar][inFullscreen] #TabsToolbar .toolbar-items { diff --git a/other/firefox/common/parts/popups.css b/other/firefox/common/parts/popups.css index 8217a7d1..0471f45c 100644 --- a/other/firefox/common/parts/popups.css +++ b/other/firefox/common/parts/popups.css @@ -256,6 +256,52 @@ panelview toolbarbutton { } } +/* Reset styles*/ + +.menu-iconic.tab-group-icon, +.menuitem-iconic.tab-group-icon, +.subviewbutton-iconic.tab-group-icon { + .toolbarbutton-icon:not([class*="identity-color-"] .toolbarbutton-icon) { + border-radius: 3px !important; + box-shadow: inset 0 0 0 99px light-dark(var(--tab-group-color), var(--tab-group-color-invert)) !important; + fill: light-dark(var(--tab-group-color), var(--tab-group-color-invert)) !important; + } +} + +.menu-iconic.tab-group-icon-collapsed, +.menuitem-iconic.tab-group-icon-collapsed, +.subviewbutton-iconic.tab-group-icon-collapsed { + .toolbarbutton-icon:not([class*="identity-color-"] .toolbarbutton-icon) { + border-radius: 3px !important; + box-shadow: inset 0 0 0 99px light-dark(var(--tab-group-color-pale), var(--tab-group-color)) !important; + fill: light-dark(var(--tab-group-color-pale), var(--tab-group-color)) !important; + } +} + +.menu-iconic.tab-group-icon-closed, +.menuitem-iconic.tab-group-icon-closed, +.subviewbutton-iconic.tab-group-icon-closed { + .toolbarbutton-icon:not([class*="identity-color-"] .toolbarbutton-icon) { + fill: transparent !important; + box-shadow: inset 0 0 0 1px light-dark(var(--tab-group-color), var(--tab-group-color-invert)) !important; + border-radius: 3px !important; + } +} + +.userContext-icon, +.subviewbutton[usercontextid] > .toolbarbutton-icon:not(#hack):not(.close-button), +#userContext-indicator { + background-image: var(--identity-icon) !important; + fill: var(--identity-icon-color) !important; +} + +.menuitem-iconic[data-usercontextid] { + list-style-image: var(--identity-icon) !important; + fill: var(--identity-icon-color) !important; +} + +/*......*/ + .bookmark-item .menu-right { fill-opacity: 1 !important; } diff --git a/src/sass/gtk/_colors-public.scss b/src/sass/gtk/_colors-public.scss index 718fc7b1..f3f2d869 100644 --- a/src/sass/gtk/_colors-public.scss +++ b/src/sass/gtk/_colors-public.scss @@ -5,34 +5,47 @@ $theme_text: currentColor; -@define-color theme_fg_color #{"" + $fg_color}; -@define-color theme_text_color #{"" + $theme_text}; @define-color theme_bg_color #{"" + $bg_color}; +@define-color theme_fg_color #{"" + $fg_color}; + @define-color theme_base_color #{"" + $base_color}; +@define-color theme_text_color #{"" + $theme_text}; + @define-color theme_selected_bg_color #{"" + $selected_bg_color}; @define-color theme_selected_fg_color #{"" + $selected_fg_color}; -@define-color fg_color #{"" + $fg_color}; -@define-color text_color #{"" + $theme_text}; + @define-color bg_color #{"" + $bg_color}; +@define-color fg_color #{"" + $fg_color}; + @define-color base_color #{"" + $base_color}; +@define-color text_color #{"" + $theme_text}; + @define-color selected_bg_color #{"" + $selected_bg_color}; @define-color selected_fg_color #{"" + $selected_fg_color}; + @define-color insensitive_bg_color #{"" + gtkmix($bg_color, $base_color, 60%)}; @define-color insensitive_fg_color #{"" + $disabled_fg_color}; @define-color insensitive_base_color #{"" + $base_color}; -@define-color theme_unfocused_fg_color #{"" + $fg_color}; -@define-color theme_unfocused_text_color #{"" + $theme_text}; + @define-color theme_unfocused_bg_color #{"" + $bg_color}; +@define-color theme_unfocused_fg_color #{"" + $fg_color}; + @define-color theme_unfocused_base_color #{"" + $base_color}; -@define-color unfocused_insensitive_color #{"" + gtkmix($fg_color, $bg_color, 35%)}; +@define-color theme_unfocused_text_color #{"" + $theme_text}; + @define-color borders #{"" + $borders_color}; + +@define-color unfocused_insensitive_color #{"" + gtkmix($fg_color, $bg_color, 35%)}; + @define-color unfocused_borders #{"" + $borders_color}; @define-color warning_color #{"" + $warning_color}; @define-color error_color #{"" + $error_color}; @define-color success_color #{"" + $success_color}; -@define-color placeholder_text_color #{#A8A8A8}; + +@define-color placeholder_text_color #{"" + $drop_target_color}; @define-color link_color #{"" + $link_color}; + @define-color content_view_bg #{"" + $base_color}; /* Very contrasty background for text views (@theme_text_color foreground) */ diff --git a/src/sass/gtk/_common-4.0.scss b/src/sass/gtk/_common-4.0.scss index f6e31c8d..5e857463 100644 --- a/src/sass/gtk/_common-4.0.scss +++ b/src/sass/gtk/_common-4.0.scss @@ -244,6 +244,7 @@ $list_shadow: if($variant == 'light', // // Base States // + .background { color: $fg_color; background-color: $bg_color; @@ -290,7 +291,7 @@ textview { > text { background-color: $base_color; // @extend %view; - selection { &:focus, & { @extend %selected_items; }} + selection { &:focus-within, & { @extend %selected_items; }} } border { @@ -625,7 +626,7 @@ entry { &:disabled { @include entry(osd-insensitive); border-image: none; } selection { - &:focus, & { + &:focus-within, & { color: $selected_bg_color; background-color: $selected_fg_color; } diff --git a/src/sass/gtk/apps/_gnome-40.0.scss b/src/sass/gtk/apps/_gnome-40.0.scss index 060ae201..0557e53b 100644 --- a/src/sass/gtk/apps/_gnome-40.0.scss +++ b/src/sass/gtk/apps/_gnome-40.0.scss @@ -1612,8 +1612,13 @@ dialog-host > widget > widget > toolbarview { // Chrome // -$chrome_bg_color: if($variant =='light', #dedede, #242424); -$chrome_fg_color: if($variant =='light', #242424, #dedede); +$chrome_bg_color: if($variant =='light', #f5f5f5, if($darker =='true', #1f1f1f, #242424)); +$chrome_fg_color: if($variant =='light', #2e2e2e, #e0e0e0); + +@if $scheme =='nord' { + $chrome_bg_color: if($variant =='light', #f3f4f6, if($darker =='true', #1d2025, #252932)); + $chrome_fg_color: if($variant =='light', #3b4252, #e5e9f0); +} $title_style: 'macos'; // 'normal' or 'macos' @@ -1648,86 +1653,87 @@ $title_style: 'macos'; // 'normal' or 'macos' background-image: none; border: none; - @if $variant == 'light' { + @if $variant =='light' { box-shadow: inset 0 0 0 1px rgba(black, 0.2); } &.close { background-color: $wm_button_close_bg; color: $wm_button_close_bg; - -gtk-icon-source: -gtk-recolor(url("assets/scalable/window-close-symbolic.svg")); &:hover { background-color: $wm_button_close_hover_bg; - color: rgba(black, 0.35); + color: gtkmix(black, $wm_button_close_hover_bg, 50%); } &:active { background-color: $wm_button_close_active_bg; - color: rgba(black, 0.35); + color: gtkmix(black, $wm_button_close_active_bg, 50%); } } &.minimize { background-color: $wm_button_minimize_bg; color: $wm_button_minimize_bg; - -gtk-icon-source: -gtk-recolor(url("assets/scalable/window-minimize-symbolic.svg")); &:hover { background-color: $wm_button_minimize_hover_bg; - color: rgba(black, 0.35); + color: gtkmix(black, $wm_button_minimize_hover_bg, 50%); } &:active { background-color: $wm_button_minimize_active_bg; - color: rgba(black, 0.35); + color: gtkmix(black, $wm_button_minimize_active_bg, 50%); } } &.maximize { background-color: $wm_button_maximize_bg; color: $wm_button_maximize_bg; - -gtk-icon-source: -gtk-recolor(url("assets/scalable/window-maximize-symbolic.svg")); &:hover { background-color: $wm_button_maximize_hover_bg; - color: rgba(black, 0.35); + color: gtkmix(black, $wm_button_maximize_hover_bg, 50%); } &:active { background-color: $wm_button_maximize_active_bg; - color: rgba(black, 0.35); + color: gtkmix(black, $wm_button_maximize_active_bg, 50%); } } } window.background.chromium { - box-shadow: 0 12px 20px rgba(black, 0.35), - 0 0 0 1px rgba(black, 0.75); + background-color: $chrome_bg_color; + color: $chrome_fg_color; + box-shadow: 0 12px 20px rgba(black, 0.35), 0 0 0 1px rgba(black, 0.75); + border-color: $borders_color; &:backdrop { + background-color: gtkmix($chrome_fg_color, $chrome_bg_color, 10%); + color: rgba($chrome_fg_color, 0.5); transition: $shadow_transition; - box-shadow: 0 7px 12px rgba(black, 0.15), - 0 0 0 1px rgba(black, 0.65); - } - - &, headerbar { - &, &:backdrop { - background-color: $chrome_bg_color; - color: $chrome_fg_color; - } + box-shadow: 0 7px 12px rgba(black, 0.15), 0 0 0 1px rgba(black, 0.65); } headerbar.header-bar.titlebar { padding: 0 $container_padding * 2; - color: currentColor; + background-color: gtkmix($chrome_fg_color, $chrome_bg_color, 10%); + color: $chrome_fg_color; box-shadow: inset 0 1px rgba(white, 0.1); border-radius: $wm_radius $wm_radius 0 0; + &:backdrop { + background-color: $chrome_bg_color; + color: rgba($chrome_fg_color, 0.5); + } + button.titlebutton { - @if $title_style == 'normal' { + @if $title_style =='normal' { @extend %normal_title_buttons; - } @else { + } + + @else { @extend %macos_title_buttons; } } @@ -1735,7 +1741,7 @@ window.background.chromium { // internal region of toolbar's entry widget > textview.view, textview { - background-color: gtkalpha(currentColor, 0.1); + background-color: gtkmix($chrome_fg_color, $chrome_bg_color, 10%); color: $chrome_fg_color; } }