[gtk: 1/2] Adwaita: Fix check/radio styling in menu



commit ea5eeb7c7a504b95d6a269b9bb22ce7dcbd854dc
Author: nana-4 <hnmaigo gmail com>
Date:   Sat Nov 16 01:08:44 2019 +0900

    Adwaita: Fix check/radio styling in menu
    
    The new check/radio style increased their specificity, but it was not
    synchronized in the menu styling.
    
    This commit increases the specificity to match the updated check/radio
    styling.
    
    https://gitlab.gnome.org/GNOME/gtk/issues/2096

 gtk/theme/Adwaita/_common.scss           | 26 +++++++++++---------------
 gtk/theme/Adwaita/gtk-contained-dark.css |  4 +---
 gtk/theme/Adwaita/gtk-contained.css      |  4 +---
 3 files changed, 13 insertions(+), 21 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 16dc9f9ddd..be63776080 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2910,21 +2910,17 @@ radio {
   menu menuitem & {
     margin: 0; // this is a workaround for a menu check/radio size allocation issue
 
-    &, &:hover, &:disabled { //FIXME use button reset mixin
-      min-height: 14px;
-      min-width: 14px;
-      background-image: none;
-      background-color: transparent;
-      box-shadow: none;
-      -gtk-icon-shadow: none;
-      color: inherit;
-      border-color: currentColor;
-    }
-    &:indeterminate, &:checked {
-      &:hover {
-        color: $checkradio_fg_color;
-        border-color: darken($checkradio_bg_color, if($variant=='light', 15%, 30%));
-      }      
+    &, &:checked, &:indeterminate {
+      &, &:hover, &:disabled { //FIXME use button reset mixin
+        min-height: 14px;
+        min-width: 14px;
+        background-image: none;
+        background-color: transparent;
+        box-shadow: none;
+        -gtk-icon-shadow: none;
+        color: inherit;
+        border-color: currentColor;
+      }
     }
   }
 }
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 4f3f139ef3..5e8fbfe8f0 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1222,9 +1222,7 @@ check:backdrop, radio:backdrop { transition: 200ms ease-out; }
 
 menu menuitem check, menu menuitem radio { margin: 0; }
 
-menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem radio, menu 
menuitem radio:hover, menu menuitem radio:disabled { min-height: 14px; min-width: 14px; background-image: 
none; background-color: transparent; box-shadow: none; -gtk-icon-shadow: none; color: inherit; border-color: 
currentColor; }
-
-menu menuitem check:indeterminate:hover, menu menuitem check:checked:hover, menu menuitem 
radio:indeterminate:hover, menu menuitem radio:checked:hover { color: #ffffff; border-color: #030c17; }
+menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem check:checked, 
menu menuitem check:checked:hover, menu menuitem check:checked:disabled, menu menuitem check:indeterminate, 
menu menuitem check:indeterminate:hover, menu menuitem check:indeterminate:disabled, menu menuitem radio, 
menu menuitem radio:hover, menu menuitem radio:disabled, menu menuitem radio:checked, menu menuitem 
radio:checked:hover, menu menuitem radio:checked:disabled, menu menuitem radio:indeterminate, menu menuitem 
radio:indeterminate:hover, menu menuitem radio:indeterminate:disabled { min-height: 14px; min-width: 14px; 
background-image: none; background-color: transparent; box-shadow: none; -gtk-icon-shadow: none; color: 
inherit; border-color: currentColor; }
 
 check { border-radius: 3px; -gtk-icon-size: 14px; }
 
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 1f6093d7c4..e8b7613ad6 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1238,9 +1238,7 @@ row:selected check, row:selected radio { border-color: #185fb4; }
 
 menu menuitem check, menu menuitem radio { margin: 0; }
 
-menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem radio, menu 
menuitem radio:hover, menu menuitem radio:disabled { min-height: 14px; min-width: 14px; background-image: 
none; background-color: transparent; box-shadow: none; -gtk-icon-shadow: none; color: inherit; border-color: 
currentColor; }
-
-menu menuitem check:indeterminate:hover, menu menuitem check:checked:hover, menu menuitem 
radio:indeterminate:hover, menu menuitem radio:checked:hover { color: #ffffff; border-color: #185fb4; }
+menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, menu menuitem check:checked, 
menu menuitem check:checked:hover, menu menuitem check:checked:disabled, menu menuitem check:indeterminate, 
menu menuitem check:indeterminate:hover, menu menuitem check:indeterminate:disabled, menu menuitem radio, 
menu menuitem radio:hover, menu menuitem radio:disabled, menu menuitem radio:checked, menu menuitem 
radio:checked:hover, menu menuitem radio:checked:disabled, menu menuitem radio:indeterminate, menu menuitem 
radio:indeterminate:hover, menu menuitem radio:indeterminate:disabled { min-height: 14px; min-width: 14px; 
background-image: none; background-color: transparent; box-shadow: none; -gtk-icon-shadow: none; color: 
inherit; border-color: currentColor; }
 
 check { border-radius: 3px; -gtk-icon-size: 14px; }
 


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