[gtk/gtk-3-22] themes: Make disabled Expander arrow look disabled



commit 154fa9817db40ccb0c44f7911dd1af5a5d41e799
Author: Daniel Boles <dboles src gmail com>
Date:   Thu Mar 29 20:51:48 2018 +0100

    themes: Make disabled Expander arrow look disabled
    
    If GtkExpander:sensitive was FALSE, the arrow still got the normal fg
    colour, which made it look clickable, in contrast to the adjacent label.
    Fix this by adding selectors to catch the applicable :disabled states.
    
    Note: Needing these may indicate an oops in generic styles elsewhere,
    but I couldn’t see any, so let’s just get it looking right for now.
    
    https://gitlab.gnome.org/GNOME/gtk/issues/146

 gtk/theme/Adwaita/_common.scss                   | 3 ++-
 gtk/theme/Adwaita/gtk-contained-dark.css         | 4 ++++
 gtk/theme/Adwaita/gtk-contained.css              | 4 ++++
 gtk/theme/HighContrast/_common.scss              | 3 +++
 gtk/theme/HighContrast/gtk-contained-inverse.css | 2 ++
 gtk/theme/HighContrast/gtk-contained.css         | 2 ++
 6 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 4f7abcbfbc..a5dc035e0e 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3670,10 +3670,11 @@ expander {
     min-width: 16px;
     min-height: 16px;
     -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
-
     &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
 
     &:hover { color: lighten($fg_color,30%); } //only lightens the arrow
+    &:disabled { color: $insensitive_fg_color; }
+    &:disabled:backdrop { color: $backdrop_insensitive_color; }
 
     &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
   }
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index f6f788d6f2..55d63e6bdb 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1574,6 +1574,10 @@ expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symb
 
 expander title > arrow:hover { color: white; }
 
+expander title > arrow:disabled { color: #919494; }
+
+expander title > arrow:disabled:backdrop { color: #566164; }
+
 expander title > arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); }
 
 /************ Calendar * */
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 42b4f8c7a7..8a9b9eb267 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1594,6 +1594,10 @@ expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symb
 
 expander title > arrow:hover { color: #748489; }
 
+expander title > arrow:disabled { color: #8b8e8f; }
+
+expander title > arrow:disabled:backdrop { color: #c3c3c0; }
+
 expander title > arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); }
 
 /************ Calendar * */
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index 254d2da5ab..aaf560fc7f 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -2799,7 +2799,10 @@ expander {
     min-height: 16px;
     -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
     &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
+
     &:hover { color: lighten($fg_color,30%); } //only lightens the arrow
+    &:disabled { color: $insensitive_fg_color; }
+
     &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
   }
 }
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css 
b/gtk/theme/HighContrast/gtk-contained-inverse.css
index 61b61141b6..9fd8d48296 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -1242,6 +1242,8 @@ expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symb
 
 expander title > arrow:hover { color: white; }
 
+expander title > arrow:disabled { color: gray; }
+
 expander title > arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); }
 
 /************ Calendar * */
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index e66667a0e4..6a2ff9b202 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -1248,6 +1248,8 @@ expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symb
 
 expander title > arrow:hover { color: #4d4d4d; }
 
+expander title > arrow:disabled { color: gray; }
+
 expander title > arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); }
 
 /************ Calendar * */


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