[gtk/wip/jimmac/adjust-for-contemporary-trends] Adwaita: :checked:active and checked:hover states
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/jimmac/adjust-for-contemporary-trends] Adwaita: :checked:active and checked:hover states
- Date: Fri, 8 Jan 2021 21:13:26 +0000 (UTC)
commit b7e6325812697bef11c17fb597eef36684b9a461
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]