From 92063e5e46f8f4baa283b9a8a2f7759ffc87da32 Mon Sep 17 00:00:00 2001 From: Sam Hewitt Date: Mon, 13 May 2024 13:22:36 -0230 Subject: [PATCH] style: Fix background color issue with menuitems - fix missing submenu bg colors - add submenu color definitions Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7570 Part-of: --- data/theme/gnome-shell-sass/_drawing.scss | 3 --- data/theme/gnome-shell-sass/widgets/_popovers.scss | 10 ++++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/data/theme/gnome-shell-sass/_drawing.scss b/data/theme/gnome-shell-sass/_drawing.scss index 3f0259019..39c6eb7b5 100644 --- a/data/theme/gnome-shell-sass/_drawing.scss +++ b/data/theme/gnome-shell-sass/_drawing.scss @@ -368,9 +368,6 @@ // extend common styles @extend %menuitem; - // lighten the background color always - $bg: lighten($bg,5%); - @if $style == 'flat' { @include button(undecorated); } @else { diff --git a/data/theme/gnome-shell-sass/widgets/_popovers.scss b/data/theme/gnome-shell-sass/widgets/_popovers.scss index 7f3df1ac8..fdc4f17f1 100644 --- a/data/theme/gnome-shell-sass/widgets/_popovers.scss +++ b/data/theme/gnome-shell-sass/widgets/_popovers.scss @@ -1,10 +1,11 @@ /* Popovers/Menus */ $menu_bg_color: $bg_color; -$menuitem_bg_color: lighten($menu_bg_color, 4%); + +$menuitem_bg_color: if($variant == 'light', darken($menu_bg_color, 5%), lighten($menu_bg_color, 5%)); $menuitem_border_radius: $base_border_radius * 1.5; -$submenu_bg_color: lighten($menu_bg_color, 7%); +$submenu_bg_color: if($variant == 'light', darken($menu_bg_color, 17%), lighten($menu_bg_color, 13%)); // the popover itself .popup-menu-boxpointer { @@ -33,7 +34,7 @@ $submenu_bg_color: lighten($menu_bg_color, 7%); // menu items .popup-menu-item { - @include menuitem($bg:$menu_bg_color); + @include menuitem($bg:$menuitem_bg_color); border-radius: $menuitem_border_radius; @@ -75,6 +76,7 @@ $submenu_bg_color: lighten($menu_bg_color, 7%); border-radius: 0 0 $menuitem_border_radius+1px $menuitem_border_radius+1px; margin-bottom: $base_padding; border: 1px solid transparent; + background-color: $submenu_bg_color; @if $contrast == 'high' { border-color: $hc_inset_color; @@ -83,8 +85,8 @@ $submenu_bg_color: lighten($menu_bg_color, 7%); // submenu specific styles .popup-menu-item { border-radius: 0; - @include menuitem($bg:$submenu_bg_color); border-top-width:0; + @include menuitem($bg:$submenu_bg_color); &:last-child { border-radius: 0 0 $menuitem_border_radius $menuitem_border_radius;