[gtk/gtk-3-24] Adwaita: selection mode buttons fix



commit 224213dad6c5cf0ebe5bf3b5f3b370ac57592a74
Author: Jakub Steiner <jimmac gmail com>
Date:   Mon Feb 4 17:24:55 2019 +0100

    Adwaita: selection mode buttons fix
    
    - don't allow the headerbar :active darkening (bug #1588) to override
      selection-mode blue buttons.
    
    Fixes issue #1642

 gtk/theme/Adwaita/_common.scss           | 23 +++++++++++++----------
 gtk/theme/Adwaita/gtk-contained-dark.css | 14 +++++++-------
 gtk/theme/Adwaita/gtk-contained.css      | 14 +++++++-------
 3 files changed, 27 insertions(+), 24 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 980356a6a6..9b1a970a5b 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1530,6 +1530,18 @@ headerbar {
     @extend .dim-label;
   }
 
+  /* Darken switchbuttons for headerbars. issue #1588 */
+  stackswitcher button:checked,
+  button.toggle:checked {
+
+    background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%)));
+    border-color: darken($borders_color, 3%);
+    border-top-color: darken($borders_color, 8%);
+    &:backdrop {
+      @include button(backdrop-active);
+    }
+  }
+
   .selection-mode &,
   &.selection-mode {
     $_hc: mix($top_hilight,$selected_bg_color, 50%); // hilight color
@@ -1682,16 +1694,7 @@ headerbar {
     }
   }
   
-  stackswitcher button:checked,
-  button.toggle:checked {
-    /* darken switchbuttons for headerbars. issue #1588 */
-    background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%)));
-    border-color: darken($borders_color, 3%);
-    border-top-color: darken($borders_color, 8%);
-    &:backdrop {
-      @include button(backdrop-active);
-    }
-  }
+
   
   separator.titlebutton { opacity: 0; } /* hide the close button separator */
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 6a977ecf32..7cb5f5f467 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -588,7 +588,7 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 .inline-toolbar:backdrop, searchbar > revealer > box:backdrop, .location-bar:backdrop { border-color: 
#202020; background-color: #2e2e2e; box-shadow: none; transition: 200ms ease-out; }
 
 /*************** Header bars * */
-.titlebar:not(headerbar), headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: 
solid; border-color: #070707; border-radius: 0; background: #1b1b1b linear-gradient(to top, #262626, 
#2b2b2b); box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); /* hide the close button separator */ }
+.titlebar:not(headerbar), headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: 
solid; border-color: #070707; border-radius: 0; background: #1b1b1b linear-gradient(to top, #262626, 
#2b2b2b); box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); /* Darken switchbuttons for headerbars. issue 
#1588 */ /* hide the close button separator */ }
 
 .titlebar:backdrop:not(headerbar), headerbar:backdrop { border-color: #202020; background-color: #353535; 
background-image: none; box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); transition: 200ms ease-out; }
 
@@ -596,6 +596,12 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .titlebar:not(headerbar) .subtitle, headerbar .subtitle { font-size: smaller; padding-left: 12px; 
padding-right: 12px; }
 
+.titlebar:not(headerbar) stackswitcher button:checked, .titlebar:not(headerbar) button.toggle:checked, 
headerbar stackswitcher button:checked, headerbar button.toggle:checked { background: image(#1e1e1e); 
border-color: #141414; border-top-color: #070707; }
+
+.titlebar:not(headerbar) stackswitcher button:checked:backdrop, .titlebar:not(headerbar) 
button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop, headerbar 
button.toggle:checked:backdrop { border-color: #202020; background-image: image(#2a2a2a); box-shadow: inset 0 
1px rgba(255, 255, 255, 0); }
+
+.titlebar:not(headerbar) stackswitcher button:checked:backdrop label, .titlebar:not(headerbar) stackswitcher 
button:checked:backdrop, .titlebar:not(headerbar) button.toggle:checked:backdrop label, 
.titlebar:not(headerbar) button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop 
label, headerbar stackswitcher button:checked:backdrop, headerbar button.toggle:checked:backdrop label, 
headerbar button.toggle:checked:backdrop { color: #919190; }
+
 .selection-mode .titlebar:not(headerbar), .selection-mode.titlebar:not(headerbar), .selection-mode 
headerbar, headerbar.selection-mode { color: #ffffff; border-color: #030c17; text-shadow: 0 -1px rgba(0, 0, 
0, 0.5); background: #15539e linear-gradient(to top, #185cb0, #1961b9); box-shadow: inset 0 1px rgba(29, 88, 
161, 0.535); }
 
 .selection-mode .titlebar:backdrop:not(headerbar), .selection-mode.titlebar:backdrop:not(headerbar), 
.selection-mode headerbar:backdrop, headerbar.selection-mode:backdrop { background-color: #15539e; 
background-image: none; box-shadow: inset 0 1px rgba(32, 91, 162, 0.442); }
@@ -666,12 +672,6 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .default-decoration.titlebar:not(headerbar) button.titlebutton, headerbar.default-decoration 
button.titlebutton { min-height: 26px; min-width: 26px; margin: 0; padding: 0; }
 
-.titlebar:not(headerbar) stackswitcher button:checked, .titlebar:not(headerbar) button.toggle:checked, 
headerbar stackswitcher button:checked, headerbar button.toggle:checked { /* darken switchbuttons for 
headerbars. issue #1588 */ background: image(#1e1e1e); border-color: #141414; border-top-color: #070707; }
-
-.titlebar:not(headerbar) stackswitcher button:checked:backdrop, .titlebar:not(headerbar) 
button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop, headerbar 
button.toggle:checked:backdrop { border-color: #202020; background-image: image(#2a2a2a); box-shadow: inset 0 
1px rgba(255, 255, 255, 0); }
-
-.titlebar:not(headerbar) stackswitcher button:checked:backdrop label, .titlebar:not(headerbar) stackswitcher 
button:checked:backdrop, .titlebar:not(headerbar) button.toggle:checked:backdrop label, 
.titlebar:not(headerbar) button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop 
label, headerbar stackswitcher button:checked:backdrop, headerbar button.toggle:checked:backdrop label, 
headerbar button.toggle:checked:backdrop { color: #919190; }
-
 .titlebar:not(headerbar) separator.titlebutton, headerbar separator.titlebutton { opacity: 0; }
 
 .solid-csd .titlebar:backdrop:dir(rtl):not(headerbar), .solid-csd 
.titlebar:backdrop:dir(ltr):not(headerbar), .solid-csd .titlebar:dir(rtl):not(headerbar), .solid-csd 
.titlebar:dir(ltr):not(headerbar), .solid-csd headerbar:backdrop:dir(rtl), .solid-csd 
headerbar:backdrop:dir(ltr), .solid-csd headerbar:dir(rtl), .solid-csd headerbar:dir(ltr) { margin-left: 
-1px; margin-right: -1px; margin-top: -1px; border-radius: 0; box-shadow: none; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 9c21500287..1aed86ee35 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -596,7 +596,7 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 .inline-toolbar:backdrop, searchbar > revealer > box:backdrop, .location-bar:backdrop { border-color: 
#d5d0cc; background-color: #eae8e6; box-shadow: none; transition: 200ms ease-out; }
 
 /*************** Header bars * */
-.titlebar:not(headerbar), headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: 
solid; border-color: #bfb8b1; border-radius: 0; background: #dfdcd8 linear-gradient(to top, #dad6d2, 
#e1dedb); box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); /* hide the close button separator */ }
+.titlebar:not(headerbar), headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: 
solid; border-color: #bfb8b1; border-radius: 0; background: #dfdcd8 linear-gradient(to top, #dad6d2, 
#e1dedb); box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); /* Darken switchbuttons for headerbars. issue 
#1588 */ /* hide the close button separator */ }
 
 .titlebar:backdrop:not(headerbar), headerbar:backdrop { border-color: #d5d0cc; background-color: #f6f5f4; 
background-image: none; box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); transition: 200ms ease-out; }
 
@@ -604,6 +604,12 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .titlebar:not(headerbar) .subtitle, headerbar .subtitle { font-size: smaller; padding-left: 12px; 
padding-right: 12px; }
 
+.titlebar:not(headerbar) stackswitcher button:checked, .titlebar:not(headerbar) button.toggle:checked, 
headerbar stackswitcher button:checked, headerbar button.toggle:checked { background: image(#cfcac4); 
border-color: #c6bfb9; border-top-color: #bab3ab; }
+
+.titlebar:not(headerbar) stackswitcher button:checked:backdrop, .titlebar:not(headerbar) 
button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop, headerbar 
button.toggle:checked:backdrop { border-color: #d5d0cc; background-image: image(#e4e4e0); box-shadow: inset 0 
1px rgba(255, 255, 255, 0); }
+
+.titlebar:not(headerbar) stackswitcher button:checked:backdrop label, .titlebar:not(headerbar) stackswitcher 
button:checked:backdrop, .titlebar:not(headerbar) button.toggle:checked:backdrop label, 
.titlebar:not(headerbar) button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop 
label, headerbar stackswitcher button:checked:backdrop, headerbar button.toggle:checked:backdrop label, 
headerbar button.toggle:checked:backdrop { color: #929595; }
+
 .selection-mode .titlebar:not(headerbar), .selection-mode.titlebar:not(headerbar), .selection-mode 
headerbar, headerbar.selection-mode { color: #ffffff; border-color: #185fb4; text-shadow: 0 -1px rgba(0, 0, 
0, 0.5); background: #3584e4 linear-gradient(to top, #2c7fe3, #3987e5); box-shadow: inset 0 1px rgba(134, 
181, 239, 0.9); }
 
 .selection-mode .titlebar:backdrop:not(headerbar), .selection-mode.titlebar:backdrop:not(headerbar), 
.selection-mode headerbar:backdrop, headerbar.selection-mode:backdrop { background-color: #3584e4; 
background-image: none; box-shadow: inset 0 1px rgba(154, 194, 242, 0.88); }
@@ -674,12 +680,6 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .default-decoration.titlebar:not(headerbar) button.titlebutton, headerbar.default-decoration 
button.titlebutton { min-height: 26px; min-width: 26px; margin: 0; padding: 0; }
 
-.titlebar:not(headerbar) stackswitcher button:checked, .titlebar:not(headerbar) button.toggle:checked, 
headerbar stackswitcher button:checked, headerbar button.toggle:checked { /* darken switchbuttons for 
headerbars. issue #1588 */ background: image(#cfcac4); border-color: #c6bfb9; border-top-color: #bab3ab; }
-
-.titlebar:not(headerbar) stackswitcher button:checked:backdrop, .titlebar:not(headerbar) 
button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop, headerbar 
button.toggle:checked:backdrop { border-color: #d5d0cc; background-image: image(#e4e4e0); box-shadow: inset 0 
1px rgba(255, 255, 255, 0); }
-
-.titlebar:not(headerbar) stackswitcher button:checked:backdrop label, .titlebar:not(headerbar) stackswitcher 
button:checked:backdrop, .titlebar:not(headerbar) button.toggle:checked:backdrop label, 
.titlebar:not(headerbar) button.toggle:checked:backdrop, headerbar stackswitcher button:checked:backdrop 
label, headerbar stackswitcher button:checked:backdrop, headerbar button.toggle:checked:backdrop label, 
headerbar button.toggle:checked:backdrop { color: #929595; }
-
 .titlebar:not(headerbar) separator.titlebutton, headerbar separator.titlebutton { opacity: 0; }
 
 .solid-csd .titlebar:backdrop:dir(rtl):not(headerbar), .solid-csd 
.titlebar:backdrop:dir(ltr):not(headerbar), .solid-csd .titlebar:dir(rtl):not(headerbar), .solid-csd 
.titlebar:dir(ltr):not(headerbar), .solid-csd headerbar:backdrop:dir(rtl), .solid-csd 
headerbar:backdrop:dir(ltr), .solid-csd headerbar:dir(rtl), .solid-csd headerbar:dir(ltr) { margin-left: 
-1px; margin-right: -1px; margin-top: -1px; border-radius: 0; box-shadow: none; }


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