From 70198e21eecb6088a160082a05441eba70b229e7 Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Thu, 29 Mar 2018 21:23:50 +0100 Subject: [PATCH] themes: Make disabled Expander arrow look disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Close https://gitlab.gnome.org/GNOME/gtk/issues/146 --- gtk/theme/Adwaita/_common.scss | 4 +++- 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, 18 insertions(+), 1 deletion(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 37f6d2f7ec..8b3e950532 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3645,9 +3645,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'); } + &: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 cf26b39aa5..ba37a6b076 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -1596,6 +1596,10 @@ expander title > arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -g expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } +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"); } expander title:hover > arrow { color: white; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 97c2ef540b..9ad4405184 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -1616,6 +1616,10 @@ expander title > arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -g expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } +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"); } expander title:hover > arrow { color: #748489; } diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss index 5e122a2d43..b387cf7efc 100644 --- a/gtk/theme/HighContrast/_common.scss +++ b/gtk/theme/HighContrast/_common.scss @@ -2769,6 +2769,9 @@ expander { min-height: 16px; -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } + + &: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 7c9f043707..6898c7808c 100644 --- a/gtk/theme/HighContrast/gtk-contained-inverse.css +++ b/gtk/theme/HighContrast/gtk-contained-inverse.css @@ -1244,6 +1244,8 @@ expander title > arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -g expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } +expander title > arrow:disabled { color: gray; } + expander title > arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } expander title:hover > arrow { color: white; } diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css index 7f5dcd70b0..8be850708f 100644 --- a/gtk/theme/HighContrast/gtk-contained.css +++ b/gtk/theme/HighContrast/gtk-contained.css @@ -1250,6 +1250,8 @@ expander title > arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -g expander title > arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } +expander title > arrow:disabled { color: gray; } + expander title > arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } expander title:hover > arrow { color: #4d4d4d; }