[libadwaita/wip/exalm/backdrop: 14/24] stylesheet: Drop backdrop style for buttons
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/backdrop: 14/24] stylesheet: Drop backdrop style for buttons
- Date: Sun, 2 May 2021 10:23:36 +0000 (UTC)
commit c9ab13c6e7592ce816ced012a2919c2a07b4c808
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Apr 30 01:29:08 2021 +0500
stylesheet: Drop backdrop style for buttons
Temporarily regress header bars. We'll restore their backdrop state in the
next commit.
src/stylesheet/_colors-public.scss | 8 ++---
src/stylesheet/_colors.scss | 3 --
src/stylesheet/_drawing.scss | 57 +-----------------------------
src/stylesheet/widgets/_buttons.scss | 34 ++++--------------
src/stylesheet/widgets/_calendar.scss | 5 +--
src/stylesheet/widgets/_header-bar.scss | 3 --
src/stylesheet/widgets/_trees.scss | 2 +-
src/stylesheet/widgets/_view-switcher.scss | 16 ++-------
8 files changed, 15 insertions(+), 113 deletions(-)
---
diff --git a/src/stylesheet/_colors-public.scss b/src/stylesheet/_colors-public.scss
index 98958cc..ad1e9b5 100644
--- a/src/stylesheet/_colors-public.scss
+++ b/src/stylesheet/_colors-public.scss
@@ -43,7 +43,7 @@ insensitive text widgets and the like base background color */
/*
widget text/foreground color on backdrop windows */
-@define-color theme_unfocused_fg_color #{"" +$backdrop_fg_color};
+@define-color theme_unfocused_fg_color #{"" +$fg_color};
/*
text color for entries, views and content in general on backdrop windows */
@@ -55,7 +55,7 @@ widget base background color on backdrop windows */
/*
text widgets and the like base background color on backdrop windows */
-@define-color theme_unfocused_base_color #{"" +$backdrop_base_color};
+@define-color theme_unfocused_base_color #{"" +$base_color};
/*
base background color of selections on backdrop windows */
@@ -67,7 +67,7 @@ text/foreground color of selections on backdrop windows */
/*
insensitive color on backdrop windows*/
-@define-color unfocused_insensitive_color #{"" + $backdrop_insensitive_color};
+@define-color unfocused_insensitive_color #{"" + $insensitive_bg_color};
/*
widgets main borders color */
@@ -94,7 +94,7 @@ $_wm_highlight: if($variant=='light', $top_hilight, // Sass gets mad if this is
these colors are exported for the window manager and shouldn't be used in applications,
read if you used those and something break with a version upgrade you're on your own... */
@define-color wm_title shade(#{$fg_color}, 1.8);
-@define-color wm_unfocused_title #{$backdrop_fg_color};
+@define-color wm_unfocused_title alpha(#{$fg_color}, 0.5);
@define-color wm_highlight #{"" + $_wm_highlight};
@define-color wm_borders_edge #{"" + $borders_edge};
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index c0dfc0e..f3e102f 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -50,9 +50,6 @@ $insensitive_bg_color: mix($bg_color, $base_color, 60%);
$insensitive_borders_color: mix($borders_color, $bg_color, 80%);
//colors for the backdrop state, derived from the main colors.
-$backdrop_base_color: if($variant == 'light', darken($base_color, 1%), lighten($base_color, 1%));
-$backdrop_fg_color: mix($fg_color, $bg_color, 50%);
-$backdrop_insensitive_color: if($variant == 'light', darken($bg_color, 15%), lighten($bg_color, 15%));
$backdrop_borders_color: mix($borders_color, $bg_color, 80%);
//special cased widget colors
diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss
index 38f1585..1c1a842 100644
--- a/src/stylesheet/_drawing.scss
+++ b/src/stylesheet/_drawing.scss
@@ -105,8 +105,7 @@ $_default_button_c: lighten($bg_color,2%);
//
// possible $t values:
// 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
+// osd, osd-hover, osd-active, osd-insensitive, undecorated
//
$_button_shadow: 0 1px 2px transparentize($shadow_color, 0.03);
@@ -192,60 +191,6 @@ $_default_button_c: lighten($bg_color,2%);
box-shadow: none;
}
- @else if $t==backdrop {
- //
- // backdrop button
- //
- $_bg: if($c != $_default_button_c, $c, $bg_color);
- $_bc: if($variant == 'light', $c, _border_color($c));
-
- color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color);
- border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
- background-image: image($_bg);
- box-shadow: none;
- }
-
- @else if $t==backdrop-active {
- //
- // backdrop pushed button
- //
- $_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%),
4%));
- $_bc: if($variant == 'light', $_bg ,_border_color($c));
-
- color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color);
- border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
- background-image: image($_bg);
- box-shadow: none;
- }
-
- @else if $t==backdrop-insensitive {
- //
- // backdrop insensitive button
- //
-
- $_bg: if($c != $_default_button_c, mix($c, $base_color, 85%), $insensitive_bg_color);
- $_bc: if($variant == 'light', $_bg,_border_color($c));
-
- color: if($c != $_default_button_c, mix($tc, $_bg, 35%), $backdrop_insensitive_color);
- border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
- background-image: image($_bg);
- box-shadow: none;
- }
-
- @else if $t==backdrop-insensitive-active {
- //
- // backdrop insensitive pushed button
- //
-
- $_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%),
4%));
- $_bc: if($variant == 'light', $_bg, _border_color($c));
-
- color: if($c != $_default_button_c, mix($tc, $_bg, 35%), $backdrop_insensitive_color);
- border-color: if($c != $_default_button_c, $_bc, $backdrop_borders_color);
- background-image: image($_bg);
- box-shadow: none;
- }
-
@else if $t==osd {
//
// normal osd button
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index cd4f3e1..9afc21d 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -35,24 +35,6 @@ button {
&:checked:hover { @include button(checked-hover); }
&:checked:active { @include button(checked-active); }
- &:backdrop {
- &.flat, & {
- @include button(backdrop);
-
- transition: $backdrop_transition;
-
- &:active,
- &:checked { @include button(backdrop-active); }
-
- &:disabled {
- @include button(backdrop-insensitive);
-
- &:active,
- &:checked { @include button(backdrop-insensitive-active); }
- }
- }
- }
-
&:disabled {
@include button(insensitive);
@@ -79,7 +61,7 @@ button {
@include button(undecorated-active);
transition: $button_transition;
}
- &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }
+ &:disabled { @include button(undecorated); }
}
&.image-button {
@@ -121,8 +103,6 @@ button {
&:not(:active):not(:checked):not(:hover):not(disabled) {
color: $selected_fg_color;
border-color: transparent;
-
- &:backdrop { color: if($variant=='light', $backdrop_base_color, $backdrop_fg_color); }
}
}
}
@@ -174,9 +154,9 @@ button {
&:hover { @include button(osd-hover); }
&:active,
- &:checked { &:backdrop, & { @include button(osd-active); }}
+ &:checked { @include button(osd-active); }
- &:disabled { &:backdrop, & { @include button(osd-insensitive); }}
+ &:disabled { @include button(osd-insensitive); }
&.flat {
@include button(undecorated);
@@ -236,9 +216,9 @@ button {
&:hover { @include button(osd-hover, $b_color); }
&:active,
- &:checked { &:backdrop, & { @include button(osd-active, $b_color); }}
+ &:checked { @include button(osd-active, $b_color); }
- &:disabled { &:backdrop, & { @include button(osd-insensitive, $b_color); }}
+ &:disabled { @include button(osd-insensitive, $b_color); }
}
}
}
@@ -299,8 +279,6 @@ button {
@else { background-position: right 3px, right 2px; }
- &:backdrop { background-size: 6px 6px, 0 0;}
-
&:dir(rtl) {
@if $variant == 'light' { background-position: left 3px, left 4px; }
@@ -389,7 +367,7 @@ button {
&:hover { @include button(undecorated-hover); }
&:active { @include button(undecorated-active); }
- &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }
+ &:disabled { @include button(undecorated); }
}
button.color {
diff --git a/src/stylesheet/widgets/_calendar.scss b/src/stylesheet/widgets/_calendar.scss
index 9225767..f5962d8 100644
--- a/src/stylesheet/widgets/_calendar.scss
+++ b/src/stylesheet/widgets/_calendar.scss
@@ -7,12 +7,9 @@ calendar {
> button {
border: none;
+ background: none;
box-shadow: none;
border-radius: 0;
-
- &, &:backdrop {
- background: none;
- }
}
}
diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss
index 7c1d37e..97c749e 100644
--- a/src/stylesheet/widgets/_header-bar.scss
+++ b/src/stylesheet/widgets/_header-bar.scss
@@ -31,9 +31,6 @@ headerbar {
background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%)));
border-color: darken($borders_color, 3%);
border-top-color: darken($borders_color, 8%);
- &:backdrop {
- @include button(backdrop-active);
- }
}
// squared corners when the window is maximized, tiled, or fullscreen
diff --git a/src/stylesheet/widgets/_trees.scss b/src/stylesheet/widgets/_trees.scss
index 9f32456..5a7726c 100644
--- a/src/stylesheet/widgets/_trees.scss
+++ b/src/stylesheet/widgets/_trees.scss
@@ -166,7 +166,7 @@ treeview.view {
background-image: none;
}
- &:last-child { &:backdrop, & { border-right-style: none; }}
+ &:last-child { border-right-style: none; }
}
/********************************************************
diff --git a/src/stylesheet/widgets/_view-switcher.scss b/src/stylesheet/widgets/_view-switcher.scss
index a0c67aa..640be74 100644
--- a/src/stylesheet/widgets/_view-switcher.scss
+++ b/src/stylesheet/widgets/_view-switcher.scss
@@ -28,7 +28,7 @@ viewswitcher {
border-right-color: transparent;
}
- &:not(:checked):hover:not(:backdrop) {
+ &:not(:checked):hover {
background-image: image(lighter($bg_color));
}
@@ -42,13 +42,9 @@ viewswitcher {
border-right-color: shade($borders_color, 1.15);
}
- &:not(:checked):hover:backdrop {
- background-image: image($bg_color);
- }
-
// View switcher in a header bar
headerbar &:not(:checked) {
- &:hover:not(:backdrop) {
+ &:hover {
// Reimplementation of $button_fill from Adwaita. The colors are made
// only 70% visible to avoid the highlight to be too strong.
$c: transparentize($bg_color, 0.3);
@@ -66,10 +62,6 @@ viewswitcher {
&:not(only-child):last-child:hover {
border-right-color: $borders_color;
}
-
- &:hover:backdrop {
- background-image: image($bg_color);
- }
}
// View switcher button
@@ -120,10 +112,6 @@ viewswitcher {
background-repeat: no-repeat;
background-position: right 0px, right 1px;
- &:backdrop {
- background-size: 6px 6px, 0 0;
- }
-
&:dir(rtl) {
background-position: left 0px, left 1px;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]