[libadwaita/wip/exalm/buttons-5: 7/18] stylesheet: Transparentize disabled buttons
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/buttons-5: 7/18] stylesheet: Transparentize disabled buttons
- Date: Thu, 10 Jun 2021 18:46:42 +0000 (UTC)
commit 631299639716d65ac0a305ad060fad829854f80f
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jun 10 22:27:16 2021 +0500
stylesheet: Transparentize disabled buttons
src/stylesheet/_drawing.scss | 35 -----------------------------------
src/stylesheet/widgets/_buttons.scss | 36 ++++--------------------------------
2 files changed, 4 insertions(+), 67 deletions(-)
---
diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss
index 7018cdc1..204ce6dd 100644
--- a/src/stylesheet/_drawing.scss
+++ b/src/stylesheet/_drawing.scss
@@ -167,30 +167,6 @@ $_default_button_c: lighten($bg_color,2%);
box-shadow: none;
}
- @else if $t==insensitive {
- //
- // insensitive button
- //
- $_bg: if($c != $_default_button_c, mix($c, $base_color, 85%), $insensitive_bg_color);
-
- color: if($tc != $fg_color, mix($tc, $_bg, 50%), $insensitive_fg_color);
- border-color: if($c != $_default_button_c, _border_color($c), $insensitive_borders_color);
- background-image: image($_bg);
- }
-
- @else if $t==insensitive-active {
- //
- // insensitive pushed button
- //
- $_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%),
6%));
- $_bc: if($c != $_default_button_c, _border_color($c), $insensitive_borders_color);
-
- color: if($c != $_default_button_c, mix($tc, $_bg, 60%), $insensitive_fg_color);
- border-color: $_bc;
- background-image: image($_bg);
- box-shadow: none;
- }
-
@else if $t==osd {
//
// normal osd button
@@ -232,17 +208,6 @@ $_default_button_c: lighten($bg_color,2%);
box-shadow: none;
}
- @else if $t==osd-insensitive {
- //
- // insensitive osd button
- //
- color: $osd_insensitive_fg_color;
- border-color: $osd_borders_color;
- background-color: transparent;
- background-image: image($osd_insensitive_bg_color);
- background-clip: padding-box;
- }
-
@else if $t==undecorated {
//
// reset
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 9f73c252..99ee151b 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -36,10 +36,11 @@ button {
&:checked:active { @include button(checked-active); }
&:disabled {
- @include button(insensitive);
+ filter: opacity(.5);
- &:active,
- &:checked { @include button(insensitive-active); }
+ label {
+ filter: none;
+ }
}
@at-root %button_basic_flat,
@@ -73,8 +74,6 @@ button {
}
}
}
-
- &:disabled { @include button(undecorated); }
}
&.image-button {
@@ -154,8 +153,6 @@ button {
&:active,
&:checked { @include button(osd-active); }
- &:disabled { @include button(osd-insensitive); }
-
&.flat {
@include button(undecorated);
@@ -163,13 +160,6 @@ button {
&:hover { @include button(osd-hover); }
- &:disabled {
- @include button(osd-insensitive);
- background-image: none;
- border-color: transparent;
- box-shadow: none;
- }
-
&:active,
&:checked { @include button(osd-active); }
}
@@ -193,21 +183,6 @@ button {
&:active,
&:checked { @include button(active, $b_color, white); }
- &.flat {
- &:disabled {
- @include button(undecorated);
-
- color: transparentize($b_color, 0.2);
- }
- }
-
- &:disabled {
- @include button(insensitive);
-
- &:active,
- &:checked { @include button(insensitive-active, $b_color, white); }
- }
-
.osd & {
@include button(osd, $b_color);
@@ -215,8 +190,6 @@ button {
&:active,
&:checked { @include button(osd-active, $b_color); }
-
- &:disabled { @include button(osd-insensitive, $b_color); }
}
}
}
@@ -303,7 +276,6 @@ button.color {
@if $variant == 'light' {
.osd &, & {
- &:disabled,
&:active,
&:checked { colorswatch:only-child { box-shadow: none; }}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]