From bee52d7442e62ae90f6c68acee050331780df628 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Thu, 1 Feb 2018 16:30:45 +0100 Subject: [PATCH 1/3] Text toggle button hover animation and stricter targetting #4350 --- rtdata/themes/RawTherapee-GTK3-20_.css | 12 ++++++++++-- rtdata/themes/RawTherapee-GTK3-_19.css | 13 +++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index f32455ca3..ba58e412f 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -325,14 +325,22 @@ scale:disabled trough { } /* Better on/off state separation for text toggle buttons, e.g. auto-levels or histogram matching. */ -button.text-button { +button.text-button.toggle { background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); } -button.text-button:checked { +button.text-button.toggle:hover { + background-image: linear-gradient(to bottom, rgba(128,128,128,.3), rgba(64,64,64,.3)); +} + +button.text-button.toggle:checked { background-image: linear-gradient(to bottom, rgba(30,30,30,.3), rgba(0,0,0,.4)); } +button.text-button.toggle:hover:checked { + background-image: linear-gradient(to bottom, rgba(48,48,48,.3), rgba(0,0,0,.3)); +} + separator { color: #363636; margin: 5px; diff --git a/rtdata/themes/RawTherapee-GTK3-_19.css b/rtdata/themes/RawTherapee-GTK3-_19.css index cfbec4355..5a0b328b0 100644 --- a/rtdata/themes/RawTherapee-GTK3-_19.css +++ b/rtdata/themes/RawTherapee-GTK3-_19.css @@ -507,10 +507,19 @@ GtkNotebook { padding-right: 3px; } -GtkButton.text-button { +/* Better on/off state separation for text toggle buttons, e.g. auto-levels or histogram matching. */ +GtkButton.text-button.toggle { background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); } -GtkButton.text-button:checked { +GtkButton.text-button.toggle:hover { + background-image: linear-gradient(to bottom, rgba(128,128,128,.3), rgba(64,64,64,.3)); +} + +GtkButton.text-button.toggle:checked { background-image: linear-gradient(to bottom, rgba(30,30,30,.3), rgba(0,0,0,.4)); } + +GtkButton.text-button.toggle:hover:checked { + background-image: linear-gradient(to bottom, rgba(48,48,48,.3), rgba(0,0,0,.3)); +} From db3111b0d327d0c4511fdb996cbc8728e5ef1f8c Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 2 Feb 2018 02:27:29 +0100 Subject: [PATCH 2/3] Text toggle button fix for GTK+ <=3.18 #4350 GTK+ <=3.18 requires different selectors than >=3.20. --- rtdata/themes/RawTherapee-GTK3-_19.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtdata/themes/RawTherapee-GTK3-_19.css b/rtdata/themes/RawTherapee-GTK3-_19.css index 5a0b328b0..8d549f8bf 100644 --- a/rtdata/themes/RawTherapee-GTK3-_19.css +++ b/rtdata/themes/RawTherapee-GTK3-_19.css @@ -508,18 +508,18 @@ GtkNotebook { } /* Better on/off state separation for text toggle buttons, e.g. auto-levels or histogram matching. */ -GtkButton.text-button.toggle { +GtkToggleButton.button.text-button { background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); } -GtkButton.text-button.toggle:hover { +GtkToggleButton.button.text-button:hover { background-image: linear-gradient(to bottom, rgba(128,128,128,.3), rgba(64,64,64,.3)); } -GtkButton.text-button.toggle:checked { +GtkToggleButton.button.text-button:checked { background-image: linear-gradient(to bottom, rgba(30,30,30,.3), rgba(0,0,0,.4)); } -GtkButton.text-button.toggle:hover:checked { +GtkToggleButton.text-button:hover:checked { background-image: linear-gradient(to bottom, rgba(48,48,48,.3), rgba(0,0,0,.3)); } From d91f177f573eaf228eb4b5ced49b9fce8c2b4a16 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 2 Feb 2018 15:57:22 +0100 Subject: [PATCH 3/3] Added missing selector #4350 --- rtdata/themes/RawTherapee-GTK3-_19.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdata/themes/RawTherapee-GTK3-_19.css b/rtdata/themes/RawTherapee-GTK3-_19.css index 8d549f8bf..a796b60a1 100644 --- a/rtdata/themes/RawTherapee-GTK3-_19.css +++ b/rtdata/themes/RawTherapee-GTK3-_19.css @@ -520,6 +520,6 @@ GtkToggleButton.button.text-button:checked { background-image: linear-gradient(to bottom, rgba(30,30,30,.3), rgba(0,0,0,.4)); } -GtkToggleButton.text-button:hover:checked { +GtkToggleButton.button.text-button:hover:checked { background-image: linear-gradient(to bottom, rgba(48,48,48,.3), rgba(0,0,0,.3)); }