[libadwaita/wip/snwh/linked-button-fixes] buttons: hit those edge cases
- From: Sam Hewitt <snwh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/snwh/linked-button-fixes] buttons: hit those edge cases
- Date: Wed, 3 Nov 2021 00:13:09 +0000 (UTC)
commit b4620c8eb6b81e825f4f30c0d5393678a50a723a
Author: Sam Hewitt <sam snwh org>
Date: Tue Nov 2 21:43:03 2021 -0230
buttons: hit those edge cases
src/stylesheet/widgets/_buttons.scss | 27 ++++++++++++++++++++++-----
src/stylesheet/widgets/_header-bar.scss | 6 ++++++
src/stylesheet/widgets/_view-switcher.scss | 6 ++++++
3 files changed, 34 insertions(+), 5 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 953b356a..034f8f3e 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -7,6 +7,8 @@ $button_checked_active_color: gtkalpha(currentColor, .35);
$opaque_button_default_bg: gtkmix($window_bg_color, $window_fg_color, 85%);
+
+
%button,
button {
@at-root %button_basic, & {
@@ -34,14 +36,10 @@ button {
&.keyboard-activating,
&:active {
background-color: $button_active_color;
- box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
- > * {transform: translateY(1px);}
}
&:checked {
background-color: $button_checked_color;
- box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
- > * {transform: translateY(1px);}
&:hover {
background-color: $button_checked_hover_color;
@@ -53,8 +51,15 @@ button {
box-shadow: none;
}
}
+
+ &:active,
+ &:checked {
+ box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
+ > * {transform: translateY(1px);}
+ }
}
+
&:disabled {
filter: opacity($disabled_opacity);
@@ -149,6 +154,12 @@ button {
}
}
+ &:active,
+ &:checked {
+ box-shadow:none;
+ > * {transform: none;}
+ }
+
// Specificity bump
&:drop(active) {
@extend %button_basic_drop_active;
@@ -251,6 +262,12 @@ button {
}
}
+ &:active,
+ &:checked {
+ box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
+ > * {transform: translateY(1px);}
+ }
+
&:disabled:not(:checked) {
filter: opacity($strong_disabled_opacity);
}
@@ -543,7 +560,7 @@ splitbutton {
@extend %button_basic_flat;
border-radius: $button_radius;
-
+
&:active,
&:checked {
box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss
index 3bfee745..5ab8b648 100644
--- a/src/stylesheet/widgets/_header-bar.scss
+++ b/src/stylesheet/widgets/_header-bar.scss
@@ -115,6 +115,12 @@ windowcontrols {
&:hover > image { background-color: $button_hover_color; }
&:hover:active > image { background-color: $button_active_color; }
+
+ &:active,
+ &:checked {
+ box-shadow:none;
+ > * {transform:none;}
+ }
}
> .icon {
diff --git a/src/stylesheet/widgets/_view-switcher.scss b/src/stylesheet/widgets/_view-switcher.scss
index 614de8b1..98f6a241 100644
--- a/src/stylesheet/widgets/_view-switcher.scss
+++ b/src/stylesheet/widgets/_view-switcher.scss
@@ -33,6 +33,12 @@ viewswitcher {
font-weight: bold;
}
}
+
+ &:active,
+ &:checked {
+ box-shadow:none;
+ > * {transform:none;}
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]