[gtk/wip/jimmac/flat-button-tweaks] Adwaita: flat button adjustments
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/jimmac/flat-button-tweaks] Adwaita: flat button adjustments
- Date: Thu, 17 Dec 2020 11:14:06 +0000 (UTC)
commit 0001e7298224cb68148cdb34f5568fee7c533474
Author: Jakub Steiner <jimmac gmail com>
Date: Thu Dec 17 11:19:46 2020 +0100
Adwaita: flat button adjustments
- normally lighter (on bg_color)
- darker for headerbar
- undecorated checked buttons were never style properly (even gtk3)
see page2 volume buttons
Finetunes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
gtk/theme/Adwaita/_common.scss | 7 +++++--
gtk/theme/Adwaita/_drawing.scss | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 90b09a635f..88bffad42e 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -540,6 +540,9 @@ button {
@include button(undecorated-active);
transition: $button_transition;
}
+ &:checked {
+ @include button(undecorated-checked);
+ }
&:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }
}
@@ -1396,9 +1399,9 @@ windowcontrols {
min-height: 0;
&:hover {
//special case hover colors inside a headerbar
- @include button(undecorated-hover,$c:$headerbar_bg_color);
+ @include button(undecorated-hover,$c:darken($headerbar_bg_color,10%));
}
- &:active { @include button(undecorated-active,$c:$headerbar_bg_color); }
+ &:active { @include button(undecorated-active,$c:darken($headerbar_bg_color,10%)); }
}
}
diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss
index dd45692767..1d30123b25 100644
--- a/gtk/theme/Adwaita/_drawing.scss
+++ b/gtk/theme/Adwaita/_drawing.scss
@@ -419,7 +419,7 @@
box-shadow: none;
text-shadow: none;
@if $variant == 'light' {
- background-color: darken($c,26%);
+ background-color: darken($c,14%);
}
@else {
background-color: darken($c,10%);
@@ -431,12 +431,24 @@
box-shadow: none;
text-shadow: none;
@if $variant == 'light' {
- background-color: darken($c,40%);
+ background-color: darken($c,30%);
}
@else {
background-color: darken($c,14%);
}
}
+ @else if $t==undecorated-checked {
+ border-color: transparent;
+ background-image: none;
+ box-shadow: none;
+ text-shadow: none;
+ @if $variant == 'light' {
+ background-color: darken($c,20%);
+ }
+ @else {
+ background-color: darken($c,12%);
+ }
+ }
}
@mixin headerbar_fill($c:$headerbar_bg_color, $hc:$top_hilight, $ov: none) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]