[gtk/wip/jimmac/adjust-for-contemporary-trends: 23/26] Adwaita: :checked:active and checked:hover states




commit 149962670a8ad3f814ec208e144557529610e770
Author: Jakub Steiner <jimmac gmail com>
Date:   Fri Jan 8 22:12:41 2021 +0100

    Adwaita: :checked:active and checked:hover states
    
    Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3560

 gtk/theme/Adwaita/_common.scss  |  3 +++
 gtk/theme/Adwaita/_drawing.scss | 22 +++++++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 6cedf755f4..5c4b396033 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -495,6 +495,9 @@ button {
       transition-duration: 50ms;
     }
 
+    &:checked:hover { @include button(checked-hover); }
+    &:checked:active { @include button(checked-active); }
+
     &:backdrop {
       &.flat, & {
         @include button(backdrop);
diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss
index 767c012dc6..2d1916ad58 100644
--- a/gtk/theme/Adwaita/_drawing.scss
+++ b/gtk/theme/Adwaita/_drawing.scss
@@ -118,7 +118,7 @@
 // $tc:   optional text color for colored* types
 //
 // possible $t values:
-// normal, hover, active, insensitive, insensitive-active,
+// normal, hover, active, checked-hover, checked-active, insensitive, insensitive-active,
 // backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
 // osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
 //
@@ -181,6 +181,26 @@
     box-shadow: none;
   }
 
+  @else if $t==checked-hover {
+  //
+  // pushed togglebutton hover
+  //
+    color: $tc;
+    border-color: if($c != $bg_color, _border_color($c), $borders_color);
+    background-image: if($variant == 'light', image(darken($c, 18%)), image(darken($c, 12%)));
+    box-shadow: none;
+  }
+
+  @else if $t==checked-active {
+  //
+  // pushed togglebutton pushed further :)
+  //
+    color: $tc;
+    border-color: if($c != $bg_color, _border_color($c), $borders_color);
+    background-image: if($variant == 'light', image(darken($c, 22%)), image(darken($c, 14%)));
+    box-shadow: none;
+  }
+
   @else if $t==insensitive {
   //
   // insensitive button


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