[libadwaita/wip/exalm/menu-checks: 11/12] stylesheet: Fix menu check/radio/arrow states
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/menu-checks: 11/12] stylesheet: Fix menu check/radio/arrow states
- Date: Wed, 19 May 2021 13:40:57 +0000 (UTC)
commit ce34580c638a6366926d11583d3e86e2e9ca84df
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed May 19 15:27:09 2021 +0500
stylesheet: Fix menu check/radio/arrow states
* Make the radio border visible in dark
* Don't dim borders or arrows on HC
* Don't dim 2 times for insensitive states
* Simplify the scss
src/stylesheet/_drawing.scss | 9 -------
src/stylesheet/widgets/_menus.scss | 49 +++++++++++++++++++-------------------
2 files changed, 24 insertions(+), 34 deletions(-)
---
diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss
index da6ff09c..d6d3fae9 100644
--- a/src/stylesheet/_drawing.scss
+++ b/src/stylesheet/_drawing.scss
@@ -341,7 +341,6 @@ $_default_button_c: lighten($bg_color,2%);
// normal, hover, active, insensitive, menu
$_border_color: if($c==$checkradio_bg_color, $checkradio_borders_color, $alt_borders_color);
- $_dim_border_color: transparentize($_border_color, if($variant == 'light', 0.3, 0.7));
@if $t==normal {
background-clip: if($checked, border-box, padding-box);
@@ -373,12 +372,4 @@ $_default_button_c: lighten($bg_color,2%);
background-image: image(transparent);
color: $tc;
}
-
- @if $t==menu-active {
- transform: scale(0.8);
- border-width: 1.2px;
- color: $tc;
- box-shadow: none;
- background-image: image(transparent);
- }
}
diff --git a/src/stylesheet/widgets/_menus.scss b/src/stylesheet/widgets/_menus.scss
index 66759511..0fd67a0b 100644
--- a/src/stylesheet/widgets/_menus.scss
+++ b/src/stylesheet/widgets/_menus.scss
@@ -51,36 +51,35 @@ popover.menu {
check,
radio {
- @include check('menu', 'transparent', $text_color);
-
- &:hover { @include check('menu-active', 'transparent', $text_color); }
- &:active { @include check('menu-active', 'transparent', $text_color); }
+ &, &:hover, &:active, &:checked, &:disabled {
+ @include check('menu', 'transparent', $text_color);
+ }
}
//only menu radios have a border
radio {
- border-color: $borders_color;
-
- &:active { border-color: transparentize($borders_color,0.5); }
+ &, &:hover, &:active, &:checked, &:disabled {
+ border-color: transparentize($text_color, if($contrast == "high", 0, 0.7));
+ }
}
- arrow.left,
- radio.left,
- check.left {
- margin-left: -2px;
- margin-right: 6px;
- }
+ check,
+ radio,
+ arrow {
+ &.left {
+ margin-left: -2px;
+ margin-right: 6px;
+ }
- arrow.right,
- radio.right,
- check.right {
- margin-left: 6px;
- margin-right: -2px;
- }
+ &.right {
+ margin-left: 6px;
+ margin-right: -2px;
+ }
- arrow:disabled,
- check:disabled,
- radio:disabled { -gtk-icon-filter: opacity(0.5); }
+ &:disabled {
+ filter: opacity(0.5);
+ }
+ }
modelbutton {
min-height: 30px;
@@ -100,13 +99,13 @@ popover.menu {
}
}
- &:disabled { color: $insensitive_fg_color; }
-
arrow {
background: none;
min-width: 16px;
min-height: 16px;
- opacity: 0.3; // dim icon
+ @if $contrast != "high" {
+ opacity: 0.3; // dim icon
+ }
&:hover { background: none; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]