From 094aca645afb2587fcabbd446b5b7e243c068d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ruiz=20de=20Alegr=C3=ADa?= Date: Wed, 30 Dec 2020 15:48:24 +0100 Subject: [PATCH] GTK3: fix flat button styles override the background of hovered notification buttons --- share/themes/Kali-Dark/gtk-3.0/gtk.css | 14 +++++++++----- share/themes/Kali-Light/gtk-3.0/gtk-dark.css | 14 +++++++++----- share/themes/Kali-Light/gtk-3.0/gtk.css | 14 +++++++++----- src/themes/Kali/sass/gtk-sass/_common-tweaks.scss | 10 ++++------ 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/share/themes/Kali-Dark/gtk-3.0/gtk.css b/share/themes/Kali-Dark/gtk-3.0/gtk.css index 37bd3f35..9a8fed1e 100644 --- a/share/themes/Kali-Dark/gtk-3.0/gtk.css +++ b/share/themes/Kali-Dark/gtk-3.0/gtk.css @@ -5064,18 +5064,22 @@ window.csd.unified:not(.solid-csd):not(.fullscreen):not(.tiled):not(.tiled-top): headerbar stackswitcher button:checked:active, headerbar stackswitcher button:checked:checked, headerbar button.toggle:active, -headerbar button.toggle:checked, button.flat:hover:not(:backdrop), button:active, button:checked { +headerbar button.toggle:checked, button.flat:hover, button:active, button:checked { background: #1b1d24; box-shadow: inset 0 3px 5px -4px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.05); } button.flat { border-color: transparent; transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); } - button.flat:hover:not(:backdrop) { + button.flat:hover { transition: none; } - button.flat:hover:not(:backdrop):link { - background: transparent; - box-shadow: none; } + button.flat:link, button.flat:backdrop { + border-color: transparent; + background-color: transparent; + background-image: none; + box-shadow: inset 0 1px rgba(255, 255, 255, 0); + text-shadow: none; + -gtk-icon-shadow: none; } /********** * Entry * diff --git a/share/themes/Kali-Light/gtk-3.0/gtk-dark.css b/share/themes/Kali-Light/gtk-3.0/gtk-dark.css index 37bd3f35..9a8fed1e 100644 --- a/share/themes/Kali-Light/gtk-3.0/gtk-dark.css +++ b/share/themes/Kali-Light/gtk-3.0/gtk-dark.css @@ -5064,18 +5064,22 @@ window.csd.unified:not(.solid-csd):not(.fullscreen):not(.tiled):not(.tiled-top): headerbar stackswitcher button:checked:active, headerbar stackswitcher button:checked:checked, headerbar button.toggle:active, -headerbar button.toggle:checked, button.flat:hover:not(:backdrop), button:active, button:checked { +headerbar button.toggle:checked, button.flat:hover, button:active, button:checked { background: #1b1d24; box-shadow: inset 0 3px 5px -4px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.05); } button.flat { border-color: transparent; transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); } - button.flat:hover:not(:backdrop) { + button.flat:hover { transition: none; } - button.flat:hover:not(:backdrop):link { - background: transparent; - box-shadow: none; } + button.flat:link, button.flat:backdrop { + border-color: transparent; + background-color: transparent; + background-image: none; + box-shadow: inset 0 1px rgba(255, 255, 255, 0); + text-shadow: none; + -gtk-icon-shadow: none; } /********** * Entry * diff --git a/share/themes/Kali-Light/gtk-3.0/gtk.css b/share/themes/Kali-Light/gtk-3.0/gtk.css index 4613ecdf..74d8ce0a 100644 --- a/share/themes/Kali-Light/gtk-3.0/gtk.css +++ b/share/themes/Kali-Light/gtk-3.0/gtk.css @@ -5086,18 +5086,22 @@ window.csd.unified:not(.solid-csd):not(.fullscreen):not(.tiled):not(.tiled-top): headerbar stackswitcher button:checked:active, headerbar stackswitcher button:checked:checked, headerbar button.toggle:active, -headerbar button.toggle:checked, button.flat:hover:not(:backdrop), button:active, button:checked { +headerbar button.toggle:checked, button.flat:hover, button:active, button:checked { background: #f2f2f2; box-shadow: inset 0 3px 5px -4px rgba(0, 0, 0, 0.1), 0 1px rgba(255, 255, 255, 0.05); } button.flat { border-color: transparent; transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); } - button.flat:hover:not(:backdrop) { + button.flat:hover { transition: none; } - button.flat:hover:not(:backdrop):link { - background: transparent; - box-shadow: none; } + button.flat:link, button.flat:backdrop { + border-color: transparent; + background-color: transparent; + background-image: none; + box-shadow: inset 0 1px rgba(255, 255, 255, 0); + text-shadow: none; + -gtk-icon-shadow: none; } /********** * Entry * diff --git a/src/themes/Kali/sass/gtk-sass/_common-tweaks.scss b/src/themes/Kali/sass/gtk-sass/_common-tweaks.scss index 3a641749..176e642a 100644 --- a/src/themes/Kali/sass/gtk-sass/_common-tweaks.scss +++ b/src/themes/Kali/sass/gtk-sass/_common-tweaks.scss @@ -31,15 +31,13 @@ button { border-color: transparent; transition: $button_transition; - &:hover:not(:backdrop) { + &:hover { @extend %button_active; transition: none; - - &:link { - background: transparent; - box-shadow: none; - } } + + &:link, + &:backdrop { @include button(undecorated); } } }