[gtk+] Adwaita: have an unchecked state for radio/checks in menus



commit aec4829d74aa2bc79b9271d84c4a4d71f6965f9f
Author: Jakub Steiner <jimmac gmail com>
Date:   Mon Aug 18 14:18:53 2014 +0200

    Adwaita: have an unchecked state for radio/checks in menus
    
    more background in https://bugzilla.gnome.org/show_bug.cgi?id=734290

 gtk/resources/theme/Adwaita/_common.scss           |    9 +++--
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   30 ++++++++++---------
 gtk/resources/theme/Adwaita/gtk-contained.css      |   30 ++++++++++---------
 3 files changed, 37 insertions(+), 32 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 0397937..3077b47 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -1661,12 +1661,13 @@ $asset_suffix: if($variant=='dark', '-dark', '');
   .menu .menuitem.#{$w} {
     color: transparentize($fg_color,0.9);
     background-image: none;
-    -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
+    -gtk-icon-source: -gtk-icontheme('#{$a}-symbolic');
     &:hover { color: transparentize($selected_fg_color,0.9); }
-    &:checked {
+    &:active, &:checked {
       color: $fg_color;
+      -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
       &:hover {
-        -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
+        -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); //specificity workaround
         color: $selected_fg_color;
       }
       &:insensitive {
@@ -1675,7 +1676,7 @@ $asset_suffix: if($variant=='dark', '-dark', '');
         &:backdrop { color: $backdrop_insensitive_color; };
       }
       &:backdrop {
-        -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
+        -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); //specificity workaround
         color: $backdrop_fg_color;
       }
     }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index df7581a..1b0b9fd 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1784,20 +1784,21 @@ GtkSwitch {
 .menu .menuitem.check {
   color: rgba(238, 238, 236, 0.1);
   background-image: none;
-  -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
+  -gtk-icon-source: -gtk-icontheme("checkbox-symbolic"); }
   .menu .menuitem.check:hover {
     color: rgba(255, 255, 255, 0.1); }
-  .menu .menuitem.check:checked {
-    color: #eeeeec; }
-    .menu .menuitem.check:checked:hover {
+  .menu .menuitem.check:active, .menu .menuitem.check:checked {
+    color: #eeeeec;
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
+    .menu .menuitem.check:active:hover, .menu .menuitem.check:checked:hover {
       -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: white; }
-    .menu .menuitem.check:checked:insensitive {
+    .menu .menuitem.check:active:insensitive, .menu .menuitem.check:checked:insensitive {
       color: #939695;
       background-image: none; }
-      .menu .menuitem.check:checked:insensitive:backdrop {
+      .menu .menuitem.check:active:insensitive:backdrop, .menu .menuitem.check:checked:insensitive:backdrop {
         color: #5d6767; }
-    .menu .menuitem.check:checked:backdrop {
+    .menu .menuitem.check:active:backdrop, .menu .menuitem.check:checked:backdrop {
       -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: #c9cbc9; }
   .menu .menuitem.check:insensitive {
@@ -1866,20 +1867,21 @@ GtkSwitch {
 .menu .menuitem.radio {
   color: rgba(238, 238, 236, 0.1);
   background-image: none;
-  -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
+  -gtk-icon-source: -gtk-icontheme("radio-symbolic"); }
   .menu .menuitem.radio:hover {
     color: rgba(255, 255, 255, 0.1); }
-  .menu .menuitem.radio:checked {
-    color: #eeeeec; }
-    .menu .menuitem.radio:checked:hover {
+  .menu .menuitem.radio:active, .menu .menuitem.radio:checked {
+    color: #eeeeec;
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
+    .menu .menuitem.radio:active:hover, .menu .menuitem.radio:checked:hover {
       -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: white; }
-    .menu .menuitem.radio:checked:insensitive {
+    .menu .menuitem.radio:active:insensitive, .menu .menuitem.radio:checked:insensitive {
       color: #939695;
       background-image: none; }
-      .menu .menuitem.radio:checked:insensitive:backdrop {
+      .menu .menuitem.radio:active:insensitive:backdrop, .menu .menuitem.radio:checked:insensitive:backdrop {
         color: #5d6767; }
-    .menu .menuitem.radio:checked:backdrop {
+    .menu .menuitem.radio:active:backdrop, .menu .menuitem.radio:checked:backdrop {
       -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: #c9cbc9; }
   .menu .menuitem.radio:insensitive {
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 585c1aa..023363e 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1779,20 +1779,21 @@ GtkSwitch {
 .menu .menuitem.check {
   color: rgba(46, 52, 54, 0.1);
   background-image: none;
-  -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
+  -gtk-icon-source: -gtk-icontheme("checkbox-symbolic"); }
   .menu .menuitem.check:hover {
     color: rgba(255, 255, 255, 0.1); }
-  .menu .menuitem.check:checked {
-    color: #2e3436; }
-    .menu .menuitem.check:checked:hover {
+  .menu .menuitem.check:active, .menu .menuitem.check:checked {
+    color: #2e3436;
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
+    .menu .menuitem.check:active:hover, .menu .menuitem.check:checked:hover {
       -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: white; }
-    .menu .menuitem.check:checked:insensitive {
+    .menu .menuitem.check:active:insensitive, .menu .menuitem.check:checked:insensitive {
       color: #8d9091;
       background-image: none; }
-      .menu .menuitem.check:checked:insensitive:backdrop {
+      .menu .menuitem.check:active:insensitive:backdrop, .menu .menuitem.check:checked:insensitive:backdrop {
         color: #c7c7c7; }
-    .menu .menuitem.check:checked:backdrop {
+    .menu .menuitem.check:active:backdrop, .menu .menuitem.check:checked:backdrop {
       -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: #54595a; }
   .menu .menuitem.check:insensitive {
@@ -1861,20 +1862,21 @@ GtkSwitch {
 .menu .menuitem.radio {
   color: rgba(46, 52, 54, 0.1);
   background-image: none;
-  -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
+  -gtk-icon-source: -gtk-icontheme("radio-symbolic"); }
   .menu .menuitem.radio:hover {
     color: rgba(255, 255, 255, 0.1); }
-  .menu .menuitem.radio:checked {
-    color: #2e3436; }
-    .menu .menuitem.radio:checked:hover {
+  .menu .menuitem.radio:active, .menu .menuitem.radio:checked {
+    color: #2e3436;
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
+    .menu .menuitem.radio:active:hover, .menu .menuitem.radio:checked:hover {
       -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: white; }
-    .menu .menuitem.radio:checked:insensitive {
+    .menu .menuitem.radio:active:insensitive, .menu .menuitem.radio:checked:insensitive {
       color: #8d9091;
       background-image: none; }
-      .menu .menuitem.radio:checked:insensitive:backdrop {
+      .menu .menuitem.radio:active:insensitive:backdrop, .menu .menuitem.radio:checked:insensitive:backdrop {
         color: #c7c7c7; }
-    .menu .menuitem.radio:checked:backdrop {
+    .menu .menuitem.radio:active:backdrop, .menu .menuitem.radio:checked:backdrop {
       -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: #54595a; }
   .menu .menuitem.radio:insensitive {


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