From 62e299b6482f0dbb8250aebb1438283ecfbd634b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ruiz=20de=20Alegr=C3=ADa?= Date: Wed, 16 Dec 2020 11:33:16 +0100 Subject: [PATCH] GTK3: theme flat buttons --- share/themes/Kali-Dark/gtk-3.0/gtk.css | 10 ++++++--- share/themes/Kali-Light/gtk-3.0/gtk-dark.css | 10 ++++++--- share/themes/Kali-Light/gtk-3.0/gtk.css | 10 ++++++--- .../Kali/sass/gtk-sass/_common-tweaks.scss | 22 ++++++++++++++----- 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/share/themes/Kali-Dark/gtk-3.0/gtk.css b/share/themes/Kali-Dark/gtk-3.0/gtk.css index ca706490..af170494 100644 --- a/share/themes/Kali-Dark/gtk-3.0/gtk.css +++ b/share/themes/Kali-Dark/gtk-3.0/gtk.css @@ -5088,12 +5088,16 @@ 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: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); } +button.flat { + border-color: transparent; + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); } + button.flat:hover { + transition: 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 ca706490..af170494 100644 --- a/share/themes/Kali-Light/gtk-3.0/gtk-dark.css +++ b/share/themes/Kali-Light/gtk-3.0/gtk-dark.css @@ -5088,12 +5088,16 @@ 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: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); } +button.flat { + border-color: transparent; + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); } + button.flat:hover { + transition: 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 a5f1aae0..b66b48ab 100644 --- a/share/themes/Kali-Light/gtk-3.0/gtk.css +++ b/share/themes/Kali-Light/gtk-3.0/gtk.css @@ -5110,12 +5110,16 @@ 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: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); } +button.flat { + border-color: transparent; + transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); } + button.flat:hover { + transition: 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 23cd0d4f..4f668c16 100644 --- a/src/themes/Kali/sass/gtk-sass/_common-tweaks.scss +++ b/src/themes/Kali/sass/gtk-sass/_common-tweaks.scss @@ -19,11 +19,23 @@ $_wm_border: if($variant=='light', transparentize(black, 0.9), transparentize($b /********** * Button * **********/ -%button_active, -button:active, -button:checked, { - background: $dark_fill; - box-shadow: $_widget_inset_shadow; +button { + @at-root %button_active, + &:active, + &:checked, { + background: $dark_fill; + box-shadow: $_widget_inset_shadow; + } + + &.flat { + border-color: transparent; + transition: $button_transition; + + &:hover { + @extend %button_active; + transition: none; + } + } } /**********