[gtk/wip/jimmac/menu-styling-adjustments] Adwaita: menu item styling



commit 2e030c472df1b2baaed6c7dfc4f9a8ae1f60b735
Author: Jakub Steiner <jimmac gmail com>
Date:   Thu Apr 30 12:10:42 2020 +0200

    Adwaita: menu item styling
    
    - tone down selection blue to grey
    - match button :active color
    
    See https://gitlab.gnome.org/GNOME/gtk/-/issues/2675

 gtk/theme/Adwaita/_colors.scss |  1 +
 gtk/theme/Adwaita/_common.scss | 19 ++++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_colors.scss b/gtk/theme/Adwaita/_colors.scss
index ae5bef174f..a9af255562 100644
--- a/gtk/theme/Adwaita/_colors.scss
+++ b/gtk/theme/Adwaita/_colors.scss
@@ -19,6 +19,7 @@ $top_hilight: $borders_edge;
 $dark_fill: mix($borders_color, $bg_color, 50%);
 $headerbar_color: if($variant == 'light', lighten($bg_color, 5%), darken($bg_color, 3%));
 $menu_color: if($variant == 'light', $base_color, mix($bg_color, $base_color, 20%));
+$menu_selected_color: $bg_color;
 $popover_bg_color: $bg_color;
 $popover_hover_color: lighten($bg_color, 5%);
 
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 595b10a3a2..3b9ed67dc5 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -4419,16 +4419,13 @@ popover.menu {
   radio {
     @include check('menu', 'transparent', $text_color);
 
-    &:hover, &:active {
-      @include check('menu-active', 'transparent', $selected_fg_color);
-    }
+    &:hover { @include check('menu-active', 'transparent', $text_color); }
+    &:active { @include check('menu-active', 'transparent', $text_color); }
   }
 
   //only menu radios have a border
   radio { border-color: $borders_color;
-    &:active, &:hover {
-       border-color: transparentize($selected_fg_color,0.5);
-    }
+    &:active { border-color: transparentize($borders_color,0.5); }
   }
 
   arrow.left,
@@ -4451,7 +4448,15 @@ popover.menu {
     padding: 0 $_menu-padding;
     border-radius: 0;
 
-    &:selected { @extend %selected_items; }
+    &:selected {
+      color: $text-color;
+      background-color: $menu_selected_color;
+    }
+    &:selected:active {
+      //@extend %selected_items;
+      //color: $selected_fg_color;
+      background-color: darken($bg_color,14%); // matching buttons
+    }
   }
 
   label.title {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]