From 4ee02725b407b277c36720f6f4279989730d24a2 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 5 Nov 2017 05:08:18 +0100 Subject: [PATCH] themes: Do expander arrow :hover properly We want to prelight the arrow even when the label is hovered. --- gtk/theme/Adwaita/_common.scss | 5 +++-- gtk/theme/Adwaita/gtk-contained-dark.css | 12 ++++++------ gtk/theme/Adwaita/gtk-contained.css | 12 ++++++------ gtk/theme/HighContrast/_common.scss | 4 +++- gtk/theme/HighContrast/gtk-contained-inverse.css | 4 ++-- gtk/theme/HighContrast/gtk-contained.css | 4 ++-- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index eaeb54cc4e..05037eb227 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3619,10 +3619,11 @@ expander { &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } - &:hover { color: lighten($fg_color,30%); } //only lightens the arrow - &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } } + title:hover arrow { + color: lighten($fg_color,30%); //only lightens the arrow + } } diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index c5abe78ed4..bb2535128e 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -1142,15 +1142,15 @@ menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, me check { border-radius: 3px; } -check:checked { -gtk-icon-source: -gtk-recolor(url("assets/check-symbolic.symbolic.png")); } +check:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/check-symbolic.symbolic.png")), -gtk-recolor(url("assets/check@2-symbolic.symbolic.png"))); } -check:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/dash-symbolic.symbolic.png")); } +check:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/dash-symbolic.symbolic.png")), -gtk-recolor(url("assets/dash@2-symbolic.symbolic.png"))); } treeview.view radio:selected:focus, treeview.view radio:selected, radio { border-radius: 100%; } -treeview.view radio:checked:selected, radio:checked { -gtk-icon-source: -gtk-recolor(url("assets/bullet-symbolic.symbolic.png")); } +treeview.view radio:checked:selected, radio:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/bullet-symbolic.symbolic.png")), -gtk-recolor(url("assets/bullet@2-symbolic.symbolic.png"))); } -treeview.view radio:indeterminate:selected, radio:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/dash-symbolic.symbolic.png")); } +treeview.view radio:indeterminate:selected, radio:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/dash-symbolic.symbolic.png")), -gtk-recolor(url("assets/dash@2-symbolic.symbolic.png"))); } radio:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: scale(0); } @@ -1568,10 +1568,10 @@ expander arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -gtk-icont expander arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } -expander arrow:hover { color: white; } - expander arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } +expander title:hover arrow { color: white; } + /************ Calendar * */ calendar { color: white; border: 1px solid #1b1f20; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index c126927366..b5fa650f54 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -1162,15 +1162,15 @@ menu menuitem check, menu menuitem check:hover, menu menuitem check:disabled, me check { border-radius: 3px; } -check:checked { -gtk-icon-source: -gtk-recolor(url("assets/check-symbolic.symbolic.png")); } +check:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/check-symbolic.symbolic.png")), -gtk-recolor(url("assets/check@2-symbolic.symbolic.png"))); } -check:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/dash-symbolic.symbolic.png")); } +check:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/dash-symbolic.symbolic.png")), -gtk-recolor(url("assets/dash@2-symbolic.symbolic.png"))); } treeview.view radio:selected:focus, treeview.view radio:selected, radio { border-radius: 100%; } -treeview.view radio:checked:selected, radio:checked { -gtk-icon-source: -gtk-recolor(url("assets/bullet-symbolic.symbolic.png")); } +treeview.view radio:checked:selected, radio:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/bullet-symbolic.symbolic.png")), -gtk-recolor(url("assets/bullet@2-symbolic.symbolic.png"))); } -treeview.view radio:indeterminate:selected, radio:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/dash-symbolic.symbolic.png")); } +treeview.view radio:indeterminate:selected, radio:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/dash-symbolic.symbolic.png")), -gtk-recolor(url("assets/dash@2-symbolic.symbolic.png"))); } radio:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: scale(0); } @@ -1588,10 +1588,10 @@ expander arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -gtk-icont expander arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } -expander arrow:hover { color: #748489; } - expander arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } +expander title:hover arrow { color: #748489; } + /************ Calendar * */ calendar { color: black; border: 1px solid #b6b6b3; } diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss index 249cc42636..c172362ce6 100644 --- a/gtk/theme/HighContrast/_common.scss +++ b/gtk/theme/HighContrast/_common.scss @@ -2776,9 +2776,11 @@ 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 &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } } + title:hover arrow { + color: lighten($fg_color,30%); //only lightens the arrow + } } /************ diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css b/gtk/theme/HighContrast/gtk-contained-inverse.css index c9ee7c888c..86d36c419e 100644 --- a/gtk/theme/HighContrast/gtk-contained-inverse.css +++ b/gtk/theme/HighContrast/gtk-contained-inverse.css @@ -1238,10 +1238,10 @@ expander arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -gtk-icont expander arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } -expander arrow:hover { color: white; } - expander arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } +expander title:hover arrow { color: white; } + /************ Calendar * */ calendar { border: 1px solid gray; } diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css index 24a1f0885b..bc8532a421 100644 --- a/gtk/theme/HighContrast/gtk-contained.css +++ b/gtk/theme/HighContrast/gtk-contained.css @@ -1244,10 +1244,10 @@ expander arrow { min-width: 16px; min-height: 16px; -gtk-icon-source: -gtk-icont expander arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } -expander arrow:hover { color: #4d4d4d; } - expander arrow:checked { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } +expander title:hover arrow { color: #4d4d4d; } + /************ Calendar * */ calendar { border: 1px solid gray; } -- 2.30.2