[gtk+] Adwaita: simplify treeview check and radio scss



commit ef8ef299c41120134fb5ad6670a2554323963a94
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Mar 16 13:11:15 2016 +0100

    Adwaita: simplify treeview check and radio scss

 gtk/theme/Adwaita/_common.scss           |   40 ++++++---------------
 gtk/theme/Adwaita/gtk-contained-dark.css |   49 ++++++-------------------
 gtk/theme/Adwaita/gtk-contained.css      |   56 +++++++-----------------------
 3 files changed, 36 insertions(+), 109 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index a69ef1d..45b52de 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2617,45 +2617,27 @@ menu menuitem {
   radio:indeterminate:checked { animation: none; }
 }
 
-
-// treeview stuff, let's the fun begin:
-treeview.view check:selected {
-  &:focus, &:backdrop, & {
-    &:disabled, & {
-      @extend %check;
+treeview.view check,
+treeview.view radio {
+  &:selected {
+    &:focus, & {
+      color: $fg_color;
 
       @if $variant == 'light' { border-color: $selected_borders_color; }
     }
-  }
-}
 
-treeview.view radio:selected {
-  &:focus, &:backdrop, & {
-    &:disabled, & {
-      @extend %radio;
+    &:disabled {
+      color: $insensitive_fg_color;
 
-      @if $variant == 'light' { border-color: $selected_borders_color; }
+      &:backdrop { color: $backdrop_insensitive_color; }
     }
   }
-}
-
-treeview.view check,
-treeview.view radio {
-  &:dir(rtl), &:dir(ltr) {  // specificity bump
-    &:selected, & {
-      &:focus, &:hover, & { color: $fg_color; }
-
-      &:backdrop {
-        &:hover, & { color: $backdrop_fg_color; }
 
-        &:disabled { color: $backdrop_insensitive_color; }
-      }
-
-      &:disabled { color: $insensitive_fg_color;}
-    }
-  }
+  &:backdrop { &:selected, & { color: $backdrop_fg_color; }}
 }
 
+treeview.view radio:selected { &:focus, & { @extend %radio; }} // This is a workaround
+
 
 /************
  * GtkScale *
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index a2d3ef1..9891522 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2566,17 +2566,14 @@ radio {
       border-color: currentColor;
       animation: none; }
 
-treeview.view check:selected:focus:disabled, treeview.view check:selected:focus, treeview.view 
check:selected:backdrop:disabled, treeview.view check:selected:backdrop, treeview.view 
check:selected:disabled, treeview.view check:selected,
 check {
   border-radius: 3px; }
-  treeview.view check:checked:selected,
   check:checked {
     -gtk-icon-source: image(-gtk-recolor(url("assets/check-symbolic.svg")), 
-gtk-recolor(url("assets/check-symbolic.symbolic.png"))); }
-  treeview.view check:indeterminate:selected,
   check:indeterminate {
     -gtk-icon-source: image(-gtk-recolor(url("assets/dash-symbolic.svg")), 
-gtk-recolor(url("assets/dash-symbolic.symbolic.png"))); }
 
-treeview.view radio:selected:focus:disabled, treeview.view radio:selected:focus, treeview.view 
radio:selected:backdrop:disabled, treeview.view radio:selected:backdrop, treeview.view 
radio:selected:disabled, treeview.view radio:selected,
+treeview.view radio:selected:focus, treeview.view radio:selected,
 radio {
   border-radius: 100%; }
   treeview.view radio:checked:selected,
@@ -2616,41 +2613,19 @@ menu menuitem check:indeterminate:checked:active,
 menu menuitem radio:indeterminate:checked {
   animation: none; }
 
-treeview.view check:dir(rtl):selected:focus, treeview.view check:dir(rtl):selected:hover, treeview.view 
check:dir(rtl):selected, treeview.view check:dir(rtl):focus, treeview.view check:dir(rtl):hover, 
treeview.view check:dir(rtl), treeview.view check:dir(ltr):selected:focus, treeview.view 
check:dir(ltr):selected:hover, treeview.view check:dir(ltr):selected, treeview.view check:dir(ltr):focus, 
treeview.view check:dir(ltr):hover, treeview.view check:dir(ltr),
-treeview.view radio:dir(rtl):selected:focus,
-treeview.view radio:dir(rtl):selected:hover,
-treeview.view radio:dir(rtl):selected,
-treeview.view radio:dir(rtl):focus,
-treeview.view radio:dir(rtl):hover,
-treeview.view radio:dir(rtl),
-treeview.view radio:dir(ltr):selected:focus,
-treeview.view radio:dir(ltr):selected:hover,
-treeview.view radio:dir(ltr):selected,
-treeview.view radio:dir(ltr):focus,
-treeview.view radio:dir(ltr):hover,
-treeview.view radio:dir(ltr) {
+treeview.view check:selected:focus, treeview.view check:selected,
+treeview.view radio:selected:focus,
+treeview.view radio:selected {
   color: #eeeeec; }
-treeview.view check:dir(rtl):selected:backdrop:hover, treeview.view check:dir(rtl):selected:backdrop, 
treeview.view check:dir(rtl):backdrop:hover, treeview.view check:dir(rtl):backdrop, treeview.view 
check:dir(ltr):selected:backdrop:hover, treeview.view check:dir(ltr):selected:backdrop, treeview.view 
check:dir(ltr):backdrop:hover, treeview.view check:dir(ltr):backdrop,
-treeview.view radio:dir(rtl):selected:backdrop:hover,
-treeview.view radio:dir(rtl):selected:backdrop,
-treeview.view radio:dir(rtl):backdrop:hover,
-treeview.view radio:dir(rtl):backdrop,
-treeview.view radio:dir(ltr):selected:backdrop:hover,
-treeview.view radio:dir(ltr):selected:backdrop,
-treeview.view radio:dir(ltr):backdrop:hover,
-treeview.view radio:dir(ltr):backdrop {
+treeview.view check:selected:disabled,
+treeview.view radio:selected:disabled {
   color: #949796; }
-treeview.view check:dir(rtl):selected:backdrop:disabled, treeview.view check:dir(rtl):backdrop:disabled, 
treeview.view check:dir(ltr):selected:backdrop:disabled, treeview.view check:dir(ltr):backdrop:disabled,
-treeview.view radio:dir(rtl):selected:backdrop:disabled,
-treeview.view radio:dir(rtl):backdrop:disabled,
-treeview.view radio:dir(ltr):selected:backdrop:disabled,
-treeview.view radio:dir(ltr):backdrop:disabled {
-  color: #5d6767; }
-treeview.view check:dir(rtl):selected:disabled, treeview.view check:dir(rtl):disabled, treeview.view 
check:dir(ltr):selected:disabled, treeview.view check:dir(ltr):disabled,
-treeview.view radio:dir(rtl):selected:disabled,
-treeview.view radio:dir(rtl):disabled,
-treeview.view radio:dir(ltr):selected:disabled,
-treeview.view radio:dir(ltr):disabled {
+  treeview.view check:selected:disabled:backdrop,
+  treeview.view radio:selected:disabled:backdrop {
+    color: #5d6767; }
+treeview.view check:backdrop:selected, treeview.view check:backdrop,
+treeview.view radio:backdrop:selected,
+treeview.view radio:backdrop {
   color: #949796; }
 
 /************
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index b1e07ad..846f082 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2593,17 +2593,14 @@ radio {
       border-color: currentColor;
       animation: none; }
 
-treeview.view check:selected:focus:disabled, treeview.view check:selected:focus, treeview.view 
check:selected:backdrop:disabled, treeview.view check:selected:backdrop, treeview.view 
check:selected:disabled, treeview.view check:selected,
 check {
   border-radius: 3px; }
-  treeview.view check:checked:selected,
   check:checked {
     -gtk-icon-source: image(-gtk-recolor(url("assets/check-symbolic.svg")), 
-gtk-recolor(url("assets/check-symbolic.symbolic.png"))); }
-  treeview.view check:indeterminate:selected,
   check:indeterminate {
     -gtk-icon-source: image(-gtk-recolor(url("assets/dash-symbolic.svg")), 
-gtk-recolor(url("assets/dash-symbolic.symbolic.png"))); }
 
-treeview.view radio:selected:focus:disabled, treeview.view radio:selected:focus, treeview.view 
radio:selected:backdrop:disabled, treeview.view radio:selected:backdrop, treeview.view 
radio:selected:disabled, treeview.view radio:selected,
+treeview.view radio:selected:focus, treeview.view radio:selected,
 radio {
   border-radius: 100%; }
   treeview.view radio:checked:selected,
@@ -2643,47 +2640,20 @@ menu menuitem check:indeterminate:checked:active,
 menu menuitem radio:indeterminate:checked {
   animation: none; }
 
-treeview.view check:selected:focus:disabled, treeview.view check:selected:focus, treeview.view 
check:selected:backdrop:disabled, treeview.view check:selected:backdrop, treeview.view 
check:selected:disabled, treeview.view check:selected {
-  border-color: #184472; }
-
-treeview.view radio:selected:focus:disabled, treeview.view radio:selected:focus, treeview.view 
radio:selected:backdrop:disabled, treeview.view radio:selected:backdrop, treeview.view 
radio:selected:disabled, treeview.view radio:selected {
+treeview.view check:selected:focus, treeview.view check:selected,
+treeview.view radio:selected:focus,
+treeview.view radio:selected {
+  color: #2e3436;
   border-color: #184472; }
-
-treeview.view check:dir(rtl):selected:focus, treeview.view check:dir(rtl):selected:hover, treeview.view 
check:dir(rtl):selected, treeview.view check:dir(rtl):focus, treeview.view check:dir(rtl):hover, 
treeview.view check:dir(rtl), treeview.view check:dir(ltr):selected:focus, treeview.view 
check:dir(ltr):selected:hover, treeview.view check:dir(ltr):selected, treeview.view check:dir(ltr):focus, 
treeview.view check:dir(ltr):hover, treeview.view check:dir(ltr),
-treeview.view radio:dir(rtl):selected:focus,
-treeview.view radio:dir(rtl):selected:hover,
-treeview.view radio:dir(rtl):selected,
-treeview.view radio:dir(rtl):focus,
-treeview.view radio:dir(rtl):hover,
-treeview.view radio:dir(rtl),
-treeview.view radio:dir(ltr):selected:focus,
-treeview.view radio:dir(ltr):selected:hover,
-treeview.view radio:dir(ltr):selected,
-treeview.view radio:dir(ltr):focus,
-treeview.view radio:dir(ltr):hover,
-treeview.view radio:dir(ltr) {
-  color: #2e3436; }
-treeview.view check:dir(rtl):selected:backdrop:hover, treeview.view check:dir(rtl):selected:backdrop, 
treeview.view check:dir(rtl):backdrop:hover, treeview.view check:dir(rtl):backdrop, treeview.view 
check:dir(ltr):selected:backdrop:hover, treeview.view check:dir(ltr):selected:backdrop, treeview.view 
check:dir(ltr):backdrop:hover, treeview.view check:dir(ltr):backdrop,
-treeview.view radio:dir(rtl):selected:backdrop:hover,
-treeview.view radio:dir(rtl):selected:backdrop,
-treeview.view radio:dir(rtl):backdrop:hover,
-treeview.view radio:dir(rtl):backdrop,
-treeview.view radio:dir(ltr):selected:backdrop:hover,
-treeview.view radio:dir(ltr):selected:backdrop,
-treeview.view radio:dir(ltr):backdrop:hover,
-treeview.view radio:dir(ltr):backdrop {
+treeview.view check:selected:disabled,
+treeview.view radio:selected:disabled {
   color: #8b8e8f; }
-treeview.view check:dir(rtl):selected:backdrop:disabled, treeview.view check:dir(rtl):backdrop:disabled, 
treeview.view check:dir(ltr):selected:backdrop:disabled, treeview.view check:dir(ltr):backdrop:disabled,
-treeview.view radio:dir(rtl):selected:backdrop:disabled,
-treeview.view radio:dir(rtl):backdrop:disabled,
-treeview.view radio:dir(ltr):selected:backdrop:disabled,
-treeview.view radio:dir(ltr):backdrop:disabled {
-  color: #c3c3c0; }
-treeview.view check:dir(rtl):selected:disabled, treeview.view check:dir(rtl):disabled, treeview.view 
check:dir(ltr):selected:disabled, treeview.view check:dir(ltr):disabled,
-treeview.view radio:dir(rtl):selected:disabled,
-treeview.view radio:dir(rtl):disabled,
-treeview.view radio:dir(ltr):selected:disabled,
-treeview.view radio:dir(ltr):disabled {
+  treeview.view check:selected:disabled:backdrop,
+  treeview.view radio:selected:disabled:backdrop {
+    color: #c3c3c0; }
+treeview.view check:backdrop:selected, treeview.view check:backdrop,
+treeview.view radio:backdrop:selected,
+treeview.view radio:backdrop {
   color: #8b8e8f; }
 
 /************


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