[gtk+] Adwaita: check/radio icon source override fix



commit f561ee34d22096694c6ec41d580b2bb9821aca9a
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Aug 13 18:44:17 2014 +0200

    Adwaita: check/radio icon source override fix

 gtk/resources/theme/Adwaita/_common.scss           |   15 +++++++++++++--
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   12 ++++++++++++
 gtk/resources/theme/Adwaita/gtk-contained.css      |   12 ++++++++++++
 3 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index be62cd2..aad4ea8 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -1655,13 +1655,19 @@ $asset_suffix: if($variant=='dark', '-dark', '');
     &:hover { color: transparentize($selected_fg_color,0.9); }
     &:active {
       color: $fg_color;
-      &:hover { color: $selected_fg_color; }
+      &:hover {
+        -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
+        color: $selected_fg_color;
+      }
       &:insensitive {
         color: $insensitive_fg_color;
         background-image: none;
         &:backdrop { color: $backdrop_insensitive_color; };
       }
-      &:backdrop { color: $backdrop_fg_color; }
+      &:backdrop {
+        -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
+        color: $backdrop_fg_color;
+      }
     }
     &:insensitive {
       color: transparentize($insensitive_fg_color,0.9);
@@ -1681,6 +1687,7 @@ $asset_suffix: if($variant=='dark', '-dark', '');
     color: transparentize($fg_color,0.9);
     background-image: none;
     -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
+    &:hover { -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); }
     &:active {
     color: $fg_color;
       &:insensitive {
@@ -1697,6 +1704,8 @@ $asset_suffix: if($variant=='dark', '-dark', '');
       -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic');
     }
     &:selected, &:selected:focus {
+      // -gtk-icon-source needed it gets overridden
+      -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
       // :selected:focus not to get overridden by .view style
       color: transparentize($selected_fg_color,0.9);
       &:active {
@@ -1707,6 +1716,8 @@ $asset_suffix: if($variant=='dark', '-dark', '');
       }
     }
     &:backdrop {
+      // -gtk-icon-source needed it gets overridden
+      -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic');
       color: transparentize($backdrop_fg_color,0.9);
       &:selected { color: transparentize($backdrop_base_color,0.9); }
     }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 782b979..fd5bf19 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1762,6 +1762,7 @@ GtkSwitch {
   .menuitem.check:active {
     color: #eeeeec; }
     .menuitem.check:active:hover {
+      -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: white; }
     .menuitem.check:active:insensitive {
       color: #939695;
@@ -1769,6 +1770,7 @@ GtkSwitch {
       .menuitem.check:active:insensitive:backdrop {
         color: #5d6767; }
     .menuitem.check:active:backdrop {
+      -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: #c9cbc9; }
   .menuitem.check:insensitive {
     color: rgba(147, 150, 149, 0.1); }
@@ -1783,6 +1785,8 @@ GtkSwitch {
   color: rgba(238, 238, 236, 0.1);
   background-image: none;
   -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
+  .view.check:hover {
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
   .view.check:active {
     color: #eeeeec; }
     .view.check:active:insensitive {
@@ -1798,12 +1802,14 @@ GtkSwitch {
   .view.check:inconsistent {
     -gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); }
   .view.check:selected, .view.check:selected:focus {
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
     color: rgba(255, 255, 255, 0.1); }
     .view.check:selected:active, .view.check:selected:focus:active {
       color: white; }
       .view.check:selected:active:backdrop, .view.check:selected:focus:active:backdrop {
         color: #c9cbc9; }
   .view.check:backdrop {
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
     color: rgba(201, 203, 201, 0.1); }
     .view.check:backdrop:selected {
       color: rgba(44, 44, 44, 0.1); }
@@ -1880,6 +1886,7 @@ GtkSwitch {
   .menuitem.radio:active {
     color: #eeeeec; }
     .menuitem.radio:active:hover {
+      -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: white; }
     .menuitem.radio:active:insensitive {
       color: #939695;
@@ -1887,6 +1894,7 @@ GtkSwitch {
       .menuitem.radio:active:insensitive:backdrop {
         color: #5d6767; }
     .menuitem.radio:active:backdrop {
+      -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: #c9cbc9; }
   .menuitem.radio:insensitive {
     color: rgba(147, 150, 149, 0.1); }
@@ -1901,6 +1909,8 @@ GtkSwitch {
   color: rgba(238, 238, 236, 0.1);
   background-image: none;
   -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
+  .view.radio:hover {
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
   .view.radio:active {
     color: #eeeeec; }
     .view.radio:active:insensitive {
@@ -1916,12 +1926,14 @@ GtkSwitch {
   .view.radio:inconsistent {
     -gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); }
   .view.radio:selected, .view.radio:selected:focus {
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
     color: rgba(255, 255, 255, 0.1); }
     .view.radio:selected:active, .view.radio:selected:focus:active {
       color: white; }
       .view.radio:selected:active:backdrop, .view.radio:selected:focus:active:backdrop {
         color: #c9cbc9; }
   .view.radio:backdrop {
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
     color: rgba(201, 203, 201, 0.1); }
     .view.radio:backdrop:selected {
       color: rgba(44, 44, 44, 0.1); }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 1d05ba7..cedaf66 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1757,6 +1757,7 @@ GtkSwitch {
   .menuitem.check:active {
     color: #2e3436; }
     .menuitem.check:active:hover {
+      -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: white; }
     .menuitem.check:active:insensitive {
       color: #8d9091;
@@ -1764,6 +1765,7 @@ GtkSwitch {
       .menuitem.check:active:insensitive:backdrop {
         color: #c7c7c7; }
     .menuitem.check:active:backdrop {
+      -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
       color: #54595a; }
   .menuitem.check:insensitive {
     color: rgba(141, 144, 145, 0.1); }
@@ -1778,6 +1780,8 @@ GtkSwitch {
   color: rgba(46, 52, 54, 0.1);
   background-image: none;
   -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
+  .view.check:hover {
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic"); }
   .view.check:active {
     color: #2e3436; }
     .view.check:active:insensitive {
@@ -1793,12 +1797,14 @@ GtkSwitch {
   .view.check:inconsistent {
     -gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); }
   .view.check:selected, .view.check:selected:focus {
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
     color: rgba(255, 255, 255, 0.1); }
     .view.check:selected:active, .view.check:selected:focus:active {
       color: white; }
       .view.check:selected:active:backdrop, .view.check:selected:focus:active:backdrop {
         color: #fcfcfc; }
   .view.check:backdrop {
+    -gtk-icon-source: -gtk-icontheme("checkbox-checked-symbolic");
     color: rgba(84, 89, 90, 0.1); }
     .view.check:backdrop:selected {
       color: rgba(252, 252, 252, 0.1); }
@@ -1875,6 +1881,7 @@ GtkSwitch {
   .menuitem.radio:active {
     color: #2e3436; }
     .menuitem.radio:active:hover {
+      -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: white; }
     .menuitem.radio:active:insensitive {
       color: #8d9091;
@@ -1882,6 +1889,7 @@ GtkSwitch {
       .menuitem.radio:active:insensitive:backdrop {
         color: #c7c7c7; }
     .menuitem.radio:active:backdrop {
+      -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
       color: #54595a; }
   .menuitem.radio:insensitive {
     color: rgba(141, 144, 145, 0.1); }
@@ -1896,6 +1904,8 @@ GtkSwitch {
   color: rgba(46, 52, 54, 0.1);
   background-image: none;
   -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
+  .view.radio:hover {
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic"); }
   .view.radio:active {
     color: #2e3436; }
     .view.radio:active:insensitive {
@@ -1911,12 +1921,14 @@ GtkSwitch {
   .view.radio:inconsistent {
     -gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); }
   .view.radio:selected, .view.radio:selected:focus {
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
     color: rgba(255, 255, 255, 0.1); }
     .view.radio:selected:active, .view.radio:selected:focus:active {
       color: white; }
       .view.radio:selected:active:backdrop, .view.radio:selected:focus:active:backdrop {
         color: #fcfcfc; }
   .view.radio:backdrop {
+    -gtk-icon-source: -gtk-icontheme("radio-checked-symbolic");
     color: rgba(84, 89, 90, 0.1); }
     .view.radio:backdrop:selected {
       color: rgba(252, 252, 252, 0.1); }


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