[gtk/wip/jimmac/adwaita-selection-checked-buttons] Adwaita: checked buttons workaround



commit c9cfdf7a914a2a27fab12572b216ebaf400b8721
Author: Jakub Steiner <jimmac gmail com>
Date:   Tue Mar 19 17:22:42 2019 +0100

    Adwaita: checked buttons workaround
    
    Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1642 once and for all
    
    (until it resurfaces)

 gtk/theme/Adwaita/_common.scss           | 4 +++-
 gtk/theme/Adwaita/gtk-contained-dark.css | 2 +-
 gtk/theme/Adwaita/gtk-contained.css      | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index c8ef9f0351..9066e50643 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1577,7 +1577,9 @@ headerbar {
       &:hover { @include button(hover, $selected_bg_color, $selected_fg_color); }
 
       &:active,
-      &:checked { @include button(active, $selected_bg_color, $selected_fg_color); }
+      &:checked,
+      &.toggle:checked,
+      &.toggle:active { @include button(active, $selected_bg_color, $selected_fg_color); }
 
       &:backdrop {
         &.flat, & {
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 037ad939ee..a54214a229 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -616,7 +616,7 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .selection-mode .titlebar:not(headerbar) button:hover, .selection-mode.titlebar:not(headerbar) button:hover, 
.selection-mode headerbar button:hover, headerbar.selection-mode button:hover { color: #ffffff; 
outline-color: rgba(255, 255, 255, 0.3); border-color: #0f3b71; border-bottom-color: #092444; text-shadow: 0 
-1px rgba(0, 0, 0, 0.671216); -gtk-icon-shadow: 0 -1px rgba(0, 0, 0, 0.671216); box-shadow: inset 0 1px 
rgba(255, 255, 255, 0.02), 0 1px 2px rgba(0, 0, 0, 0.07); background-image: linear-gradient(to top, #155099, 
#1655a2 1px); }
 
-.selection-mode .titlebar:not(headerbar) button:active, .selection-mode .titlebar:not(headerbar) 
button:checked, .selection-mode.titlebar:not(headerbar) button:active, 
.selection-mode.titlebar:not(headerbar) button:checked, .selection-mode headerbar button:active, 
.selection-mode headerbar button:checked, headerbar.selection-mode button:active, headerbar.selection-mode 
button:checked { color: #ffffff; outline-color: rgba(255, 255, 255, 0.3); border-color: #0f3b71; 
background-image: image(#103e75); box-shadow: inset 0 1px rgba(255, 255, 255, 0); text-shadow: none; 
-gtk-icon-shadow: none; }
+.selection-mode .titlebar:not(headerbar) button:active, .selection-mode .titlebar:not(headerbar) 
button:checked, .selection-mode .titlebar:not(headerbar) button.toggle:checked, .selection-mode 
.titlebar:not(headerbar) button.toggle:active, .selection-mode.titlebar:not(headerbar) button:active, 
.selection-mode.titlebar:not(headerbar) button:checked, .selection-mode.titlebar:not(headerbar) 
button.toggle:checked, .selection-mode.titlebar:not(headerbar) button.toggle:active, .selection-mode 
headerbar button:active, .selection-mode headerbar button:checked, .selection-mode headerbar 
button.toggle:checked, .selection-mode headerbar button.toggle:active, headerbar.selection-mode 
button:active, headerbar.selection-mode button:checked, headerbar.selection-mode button.toggle:checked, 
headerbar.selection-mode button.toggle:active { color: #ffffff; outline-color: rgba(255, 255, 255, 0.3); 
border-color: #0f3b71; background-image: image(#103e75); box-shadow: inset 0 1px rgba(255, 255, 255
 , 0); te
 xt-shadow: none; -gtk-icon-shadow: none; }
 
 .selection-mode .titlebar:not(headerbar) button:backdrop.flat, .selection-mode .titlebar:not(headerbar) 
button:backdrop, .selection-mode.titlebar:not(headerbar) button:backdrop.flat, 
.selection-mode.titlebar:not(headerbar) button:backdrop, .selection-mode headerbar button:backdrop.flat, 
.selection-mode headerbar button:backdrop, headerbar.selection-mode button:backdrop.flat, 
headerbar.selection-mode button:backdrop { border-color: #0f3b71; background-image: image(#15539e); 
text-shadow: none; -gtk-icon-shadow: none; box-shadow: inset 0 1px rgba(255, 255, 255, 0); -gtk-icon-effect: 
none; border-color: #030c17; }
 
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 07a4564a33..e96af7ebf4 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -624,7 +624,7 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .selection-mode .titlebar:not(headerbar) button:hover, .selection-mode.titlebar:not(headerbar) button:hover, 
.selection-mode headerbar button:hover, headerbar.selection-mode button:hover { color: #ffffff; 
outline-color: rgba(255, 255, 255, 0.3); border-color: #1b6acb; border-bottom-color: #15539e; text-shadow: 0 
-1px rgba(0, 0, 0, 0.511216); -gtk-icon-shadow: 0 -1px rgba(0, 0, 0, 0.511216); box-shadow: inset 0 1px 
rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.07); background-image: linear-gradient(to top, #3584e4, 
#3987e5 1px); }
 
-.selection-mode .titlebar:not(headerbar) button:active, .selection-mode .titlebar:not(headerbar) 
button:checked, .selection-mode.titlebar:not(headerbar) button:active, 
.selection-mode.titlebar:not(headerbar) button:checked, .selection-mode headerbar button:active, 
.selection-mode headerbar button:checked, headerbar.selection-mode button:active, headerbar.selection-mode 
button:checked { color: #ffffff; outline-color: rgba(255, 255, 255, 0.3); border-color: #1b6acb; 
background-image: image(#1961b9); box-shadow: inset 0 1px rgba(255, 255, 255, 0); text-shadow: none; 
-gtk-icon-shadow: none; }
+.selection-mode .titlebar:not(headerbar) button:active, .selection-mode .titlebar:not(headerbar) 
button:checked, .selection-mode .titlebar:not(headerbar) button.toggle:checked, .selection-mode 
.titlebar:not(headerbar) button.toggle:active, .selection-mode.titlebar:not(headerbar) button:active, 
.selection-mode.titlebar:not(headerbar) button:checked, .selection-mode.titlebar:not(headerbar) 
button.toggle:checked, .selection-mode.titlebar:not(headerbar) button.toggle:active, .selection-mode 
headerbar button:active, .selection-mode headerbar button:checked, .selection-mode headerbar 
button.toggle:checked, .selection-mode headerbar button.toggle:active, headerbar.selection-mode 
button:active, headerbar.selection-mode button:checked, headerbar.selection-mode button.toggle:checked, 
headerbar.selection-mode button.toggle:active { color: #ffffff; outline-color: rgba(255, 255, 255, 0.3); 
border-color: #1b6acb; background-image: image(#1961b9); box-shadow: inset 0 1px rgba(255, 255, 255
 , 0); te
 xt-shadow: none; -gtk-icon-shadow: none; }
 
 .selection-mode .titlebar:not(headerbar) button:backdrop.flat, .selection-mode .titlebar:not(headerbar) 
button:backdrop, .selection-mode.titlebar:not(headerbar) button:backdrop.flat, 
.selection-mode.titlebar:not(headerbar) button:backdrop, .selection-mode headerbar button:backdrop.flat, 
.selection-mode headerbar button:backdrop, headerbar.selection-mode button:backdrop.flat, 
headerbar.selection-mode button:backdrop { border-color: #3584e4; background-image: image(#3584e4); 
text-shadow: none; -gtk-icon-shadow: none; box-shadow: inset 0 1px rgba(255, 255, 255, 0); -gtk-icon-effect: 
none; border-color: #185fb4; }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]