[gtk: 1/2] Adwaita: Stop using $button_fill
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Adwaita: Stop using $button_fill
- Date: Sun, 15 Nov 2020 13:45:43 +0000 (UTC)
commit f1db73379ef8bb94beffb127f8b18ba0d3c18297
Author: nana-4 <hnmaigo gmail com>
Date: Sat Nov 14 09:57:55 2020 +0900
Adwaita: Stop using $button_fill
Since the $button_fill variables are no longer used outside of the
button() mixin (and it was for an ugly hack), there is no need to keep
that anymore.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3354
gtk/theme/Adwaita/_common.scss | 1 -
gtk/theme/Adwaita/_drawing.scss | 56 ++++++++++++++---------------------------
2 files changed, 19 insertions(+), 38 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 984348362d..3e6eda5867 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -11,7 +11,6 @@ $button_radius: 5px;
$menu_radius: 5px;
$window_radius: $button_radius + 3;
$popover_radius: $button_radius + 4;
-$button_fill: null; // global var defined within a parameter driven mixin. See issue #2703
/***************
* Base States *
diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss
index 9103e0fdc2..e252d4d022 100644
--- a/gtk/theme/Adwaita/_drawing.scss
+++ b/gtk/theme/Adwaita/_drawing.scss
@@ -162,8 +162,6 @@
// normal, hover, active, insensitive, insensitive-active,
// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
// osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
-//
-// This mixin sets the $button_fill global variable which contains the button background-image
//
$_hilight_color: _button_hilight_color($c);
$_button_edge: if($edge == none, none, _widget_edge($edge));
@@ -178,9 +176,8 @@
outline-color: if($c != $bg_color, $alt_focus_border_color, $focus_border_color);
border-color: if($c != $bg_color, _border_color($c), $borders_color);
border-bottom-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
- $button_fill: if($variant == 'light', linear-gradient(to top, darken($c, 4%) 2px, $c),
- linear-gradient(to top, darken($c,1%) 2px, $c));
- background-image: $button_fill;
+ background-image: if($variant == 'light', linear-gradient(to top, darken($c, 4%) 2px, $c),
+ linear-gradient(to top, darken($c,1%) 2px, $c));
@include _shadows(inset 0 1px $_hilight_color, $_button_edge, $_button_shadow);
}
@@ -192,14 +189,13 @@
border-color: if($c != $bg_color, _border_color($c), $borders_color);
border-bottom-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
@if $variant == 'light' {
- $button_fill: linear-gradient(to top, $c, lighten($c, 1%) 1px);
+ background-image: linear-gradient(to top, $c, lighten($c, 1%) 1px);
@include _shadows(inset 0 1px _button_hilight_color(lighten($c, 6%)), $_button_edge, $_button_shadow);
}
@else {
- $button_fill: linear-gradient(to top, darken($c,1%), lighten($c, 1%) 1px);
+ background-image: linear-gradient(to top, darken($c,1%), lighten($c, 1%) 1px);
@include _shadows(inset 0 1px _button_hilight_color(darken($c, 2%)), $_button_edge, $_button_shadow);
}
- background-image: $button_fill;
}
@if $t==normal-alt {
@@ -228,16 +224,15 @@
color: $tc;
border-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
@if $variant == 'light' {
- $button_fill: linear-gradient(to bottom, lighten($c, 9%) 10%, lighten($c, 4%) 90%);
+ background-image: linear-gradient(to bottom, lighten($c, 9%) 10%, lighten($c, 4%) 90%);
@include _shadows(inset 0 1px _button_hilight_color(lighten($c, 6%)),
$_button_edge, $_button_shadow);
}
@else {
- $button_fill: linear-gradient(to bottom, $c 20%, darken($c, 4%) 90%);
+ background-image: linear-gradient(to bottom, $c 20%, darken($c, 4%) 90%);
@include _shadows(inset 0 1px $_hilight_color,
$_button_edge, $_button_shadow);
}
- background-image: $button_fill;
}
@else if $t==active {
@@ -246,8 +241,7 @@
//
color: $tc;
border-color: if($c != $bg_color, _border_color($c), $borders_color);
- $button_fill: if($variant == 'light', image(darken($c, 14%)), image(darken($c, 9%)));
- background-image: $button_fill;
+ background-image: if($variant == 'light', image(darken($c, 14%)), image(darken($c, 9%)));
@include _shadows(inset 0 1px transparentize($_hilight_color, 1), $_button_edge);
text-shadow: none;
@@ -262,8 +256,7 @@
color: if($tc != $fg_color, mix($tc, $_bg, 50%), $insensitive_fg_color);
border-color: if($c != $bg_color, _border_color($c), $insensitive_borders_color);
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
text-shadow: none;
-gtk-icon-shadow: none;
// white with 0 alpha to avoid an ugly transition, since no color means
@@ -280,8 +273,7 @@
color: if($c != $bg_color, mix($tc, $_bg, 60%), $insensitive_fg_color);
border-color: $_bc;
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
// white with 0 alpha to avoid an ugly transition, since no color means
// black with 0 alpha
@include _shadows(inset 0 1px transparentize(white, 1), $_button_edge);
@@ -296,8 +288,7 @@
color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color);
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
text-shadow: none;
-gtk-icon-shadow: none;
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
@@ -312,8 +303,7 @@
color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color);
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
}
@@ -327,8 +317,7 @@
color: if($c != $bg_color, mix($tc, $_bg, 35%), $backdrop_insensitive_color);
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
text-shadow: none;
-gtk-icon-shadow: none;
// white with 0 alpha to avoid an ugly transition, since no color means
@@ -346,8 +335,7 @@
color: if($c != $bg_color, mix($tc, $_bg, 35%), $backdrop_insensitive_color);
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
}
@@ -361,8 +349,7 @@
outline-color: if($c != $bg_color, $alt_focus_border_color, $focus_border_color);
border-color: $osd_borders_color;
background-color: transparent;
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
background-clip: padding-box;
box-shadow: inset 0 1px transparentize(white, 0.9);
text-shadow: none;
@@ -378,8 +365,7 @@
color: white;
border-color: $osd_borders_color;
background-color: transparent;
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
background-clip: padding-box;
box-shadow: inset 0 1px transparentize(white, 0.9);
text-shadow: none;
@@ -395,8 +381,7 @@
color: white;
border-color: $osd_borders_color;
background-color: transparent;
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
background-clip: padding-box;
box-shadow: none;
text-shadow: none;
@@ -410,8 +395,7 @@
color: $osd_insensitive_fg_color;
border-color: $osd_borders_color;
background-color: transparent;
- $button_fill: image($osd_insensitive_bg_color);
- background-image: $button_fill;
+ background-image: image($osd_insensitive_bg_color);
background-clip: padding-box;
box-shadow: none;
text-shadow: none;
@@ -427,8 +411,7 @@
color: $osd_fg_color;
border-color: $osd_borders_color;
background-color: transparent;
- $button_fill: image($_bg);
- background-image: $button_fill;
+ background-image: image($_bg);
background-clip: padding-box;
box-shadow: none;
text-shadow: none;
@@ -441,8 +424,7 @@
//
border-color: transparent;
background-color: transparent;
- $button_fill: none;
- background-image: $button_fill;
+ background-image: none;
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]