[libadwaita/wip/snwh/checks: 3/5] stylesheet: Tweak check style
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/snwh/checks: 3/5] stylesheet: Tweak check style
- Date: Sun, 5 Dec 2021 20:13:11 +0000 (UTC)
commit 0d10d85e0714c0fa38a69c8b328ceaea25d4d6c9
Author: Sam Hewitt <sam snwh org>
Date: Sun Dec 5 23:41:17 2021 +0500
stylesheet: Tweak check style
src/stylesheet/widgets/_checks.scss | 45 ++++++++++++++++---------------------
1 file changed, 19 insertions(+), 26 deletions(-)
---
diff --git a/src/stylesheet/widgets/_checks.scss b/src/stylesheet/widgets/_checks.scss
index 48daec11..3183cd83 100644
--- a/src/stylesheet/widgets/_checks.scss
+++ b/src/stylesheet/widgets/_checks.scss
@@ -21,26 +21,35 @@ radio {
min-height: 20px;
min-width: 20px;
-gtk-icon-size: 20px;
- background-color: $trough_color;
- @if $contrast == "high" {
- box-shadow: inset 0 0 0 1px $border_color;
+ @if $contrast == 'high' {
+ box-shadow: inset 0 0 0 2px $border_color;
+ } @else {
+ box-shadow: inset 0 0 0 2px $trough_color;
}
- &:hover:not(:checked):not(:indeterminate) {
- background-color: $trough_hover_color;
+ &:not(:checked):not(:indeterminate):hover {
+ @if $contrast == 'high' {
+ box-shadow: inset 0 0 0 2px gtkalpha(currentColor, .6);
+ } @else {
+ box-shadow: inset 0 0 0 2px $trough_hover_color;
+ }
- &:active { background-color: $trough_active_color; }
+ &:active {
+ @if $contrast == 'high' {
+ background-color: gtkalpha(currentColor, .6);
+ } @else {
+ background-color: $trough_active_color;
+ }
+ box-shadow: none;
+ }
}
&:checked,
&:indeterminate {
background-color: $fill_color;
color: $fill_text_color;
-
- @if $contrast == "high" {
- box-shadow: none;
- }
+ box-shadow: none;
&:hover {
background-image: image(gtkalpha(currentColor, .1));
@@ -92,22 +101,6 @@ checkbutton.selection-mode {
border-radius: 100px;
}
- check:not(:checked):not(:indeterminate),
- radio:not(:checked):not(:indeterminate) {
- background: none;
- box-shadow: inset 0 0 0 2px $trough_color;
- -gtk-icon-source: none;
-
- &:hover {
- box-shadow: inset 0 0 0 2px $trough_hover_color;
-
- &:active {
- background: none;
- box-shadow: inset 0 0 0 2px $trough_active_color;
- }
- }
- }
-
check:checked { -gtk-icon-source:
-gtk-scaled(-gtk-recolor(url("assets/check-small-symbolic.symbolic.png")),
-gtk-recolor(url("assets/check-small 2-symbolic symbolic
png"))); }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]