SHA256
1
0
forked from pool/breeze-gtk
breeze-gtk/0001-Revert-gtk3-gtk4-update-button-style.patch
Christophe Giboudeaux 36f2e9c390 Accepting request 924807 from home:Vogtinator:plasma5.23
- Add patch to fix toolbutton appearance (kde#443626):
  * 0001-Revert-gtk3-gtk4-update-button-style.patch

OBS-URL: https://build.opensuse.org/request/show/924807
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/breeze-gtk?expand=0&rev=145
2021-10-12 08:07:49 +00:00

156 lines
5.3 KiB
Diff

From fbce32bf0ff9232eaf8075b2fd6cc34002f1ef46 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 12 Oct 2021 10:03:30 +0200
Subject: [PATCH] Revert "gtk3, gtk4: update button style"
This reverts commit 3b2ce1abd2f45cf844c43cac6e7009a59bff0dd9.
---
src/gtk3/widgets/_button.scss | 21 ++++++++++-----------
src/gtk3/widgets/_headerbar.scss | 6 ++++--
src/gtk4/widgets/_button.scss | 28 ++++++++++------------------
src/gtk4/widgets/_headerbar.scss | 3 +--
4 files changed, 25 insertions(+), 33 deletions(-)
diff --git a/src/gtk3/widgets/_button.scss b/src/gtk3/widgets/_button.scss
index 4bd0ce7..004c4e6 100644
--- a/src/gtk3/widgets/_button.scss
+++ b/src/gtk3/widgets/_button.scss
@@ -40,22 +40,16 @@
//
// pushed button
//
- color: gtk("@theme_button_foreground_normal");
- border-color: gtkmix(gtk("@theme_button_background_normal"), gtk("@theme_button_foreground_normal"), 0.3);
- background-color: gtkalpha(gtk("@theme_button_foreground_normal"), 0.125);
- } @else if $t == titlebar-active {
- //
- // pushed button
- //
- color: gtk("@theme_button_foreground_normal");
- border-color: gtkmix(gtk("@theme_button_decoration_focus"), gtk("@theme_button_decoration_focus"), 0.3);
- background-color: gtkalpha(gtk("@theme_button_decoration_focus"), 0.125);
+ color: gtk("@theme_button_foreground_active");
+ border-color: gtk("@theme_button_decoration_focus");
+ background-color: gtk("@theme_button_decoration_focus");
} @else if $t==active-hover {
//
- // pushed & hovered button
+ //
//
color: gtk("@theme_button_foreground_normal");
border-color: gtk("@theme_button_decoration_hover");
+ background-color: gtk("@theme_button_decoration_hover");
} @else if $t==insensitive {
//
// insensitive button
@@ -176,6 +170,7 @@ $_dot_color: gtk("@theme_button_decoration_focus");
@include button(normal);
&.flat {
+ @include button(undecorated);
// to avoid adiacent buttons borders clashing when transitioning, the transition on the normal state is set
// to none, while it's added back in the hover state, so the button decoration will fade in on hover, but
// it won't fade out when the pointer leave the button allocation area. To make the transition more evident
@@ -228,12 +223,15 @@ $_dot_color: gtk("@theme_button_decoration_focus");
}
&.flat:backdrop {
-gtk-icon-effect: none;
+ @include button(undecorated);
color: gtk("@theme_button_foreground_backdrop");
}
&.flat:disabled {
+ @include button(undecorated);
color: gtk("@theme_button_foreground_insensitive");
}
&.flat:backdrop:disabled {
+ @include button(undecorated);
color: gtk("@theme_button_foreground_backdrop_insensitive");
}
&:disabled {
@@ -357,6 +355,7 @@ button {
&.flat:backdrop,
&.flat:disabled,
&.flat:backdrop:disabled {
+ @include button(undecorated);
color: gtkalpha($button_color, 0.8);
}
&:disabled {
diff --git a/src/gtk3/widgets/_headerbar.scss b/src/gtk3/widgets/_headerbar.scss
index 7db8451..1bfe580 100644
--- a/src/gtk3/widgets/_headerbar.scss
+++ b/src/gtk3/widgets/_headerbar.scss
@@ -53,8 +53,10 @@ headerbar {
}
&:active,
&:checked {
- @include button(titlebar-active);
- color: gtk("@theme_titlebar_foreground");
+ @include button(active);
+ &:hover {
+ @include button(active-hover);
+ }
&:backdrop {
background-image: none;
background-color: gtk("@theme_titlebar_background_backdrop");
diff --git a/src/gtk4/widgets/_button.scss b/src/gtk4/widgets/_button.scss
index 08d84d7..c026430 100644
--- a/src/gtk4/widgets/_button.scss
+++ b/src/gtk4/widgets/_button.scss
@@ -42,29 +42,21 @@
}
@else if $t==active {
- //
- // pushed button
- //
- color: gtk("@theme_button_foreground_normal");
- border-color: gtkmix(gtk("@theme_button_background_normal"), gtk("@theme_button_foreground_normal"), 0.3);
- background-color: gtkalpha(gtk("@theme_button_foreground_normal"), 0.125);
- }
-
- @else if $t == titlebar-active {
- //
- // pushed button
- //
- color: gtk("@theme_button_foreground_normal");
- border-color: gtkmix(gtk("@theme_button_decoration_focus"), gtk("@theme_button_decoration_focus"), 0.3);
- background-color: gtkalpha(gtk("@theme_button_decoration_focus"), 0.125);
+ //
+ // pushed button
+ //
+ color: gtk("@theme_button_foreground_active");
+ border-color: gtk("@theme_button_decoration_focus");
+ background-color: gtk("@theme_button_decoration_focus");
}
@else if $t==active-hover {
- //
- // pushed & hovered button
- //
+ //
+ //
+ //
color: gtk("@theme_button_foreground_normal");
border-color: gtk("@theme_button_decoration_hover");
+ background-color: gtk("@theme_button_decoration_hover");
}
@else if $t==insensitive {
diff --git a/src/gtk4/widgets/_headerbar.scss b/src/gtk4/widgets/_headerbar.scss
index b1a88c5..b09bc01 100644
--- a/src/gtk4/widgets/_headerbar.scss
+++ b/src/gtk4/widgets/_headerbar.scss
@@ -50,8 +50,7 @@ headerbar {
}
}
&:active, &:checked {
- @include button(titlebar-active);
- color: gtk("@theme_titlebar_foreground");
+ @include button(active);
&:hover {
@include button(active-hover);
}
--
2.33.0