From 36f2e9c390b06ffd065fc76a3e045fe31e49fa21bee462d501ab8ac597d4783e Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Tue, 12 Oct 2021 08:07:49 +0000 Subject: [PATCH] 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 --- ...Revert-gtk3-gtk4-update-button-style.patch | 155 ++++++++++++++++++ breeze-gtk.changes | 6 + 2 files changed, 161 insertions(+) create mode 100644 0001-Revert-gtk3-gtk4-update-button-style.patch diff --git a/0001-Revert-gtk3-gtk4-update-button-style.patch b/0001-Revert-gtk3-gtk4-update-button-style.patch new file mode 100644 index 0000000..3b32a05 --- /dev/null +++ b/0001-Revert-gtk3-gtk4-update-button-style.patch @@ -0,0 +1,155 @@ +From fbce32bf0ff9232eaf8075b2fd6cc34002f1ef46 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +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 + diff --git a/breeze-gtk.changes b/breeze-gtk.changes index 2619614..404abcd 100644 --- a/breeze-gtk.changes +++ b/breeze-gtk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 12 08:04:02 UTC 2021 - Fabian Vogt + +- Add patch to fix toolbutton appearance (kde#443626): + * 0001-Revert-gtk3-gtk4-update-button-style.patch + ------------------------------------------------------------------- Thu Oct 7 13:50:05 UTC 2021 - Fabian Vogt