[gtk] Update stackswitcher CSS



commit b8f62d1e10a620302f7cd236005e1e063116bf9c
Author: Timm Bäder <mail baedert org>
Date:   Sat Oct 12 18:26:54 2019 +0200

    Update stackswitcher CSS
    
    Add the spacing to circular stack switchers back.

 gtk/gtkshortcutssection.c                |  3 +++
 gtk/theme/Adwaita/_common.scss           | 20 ++++++++++++--------
 gtk/theme/Adwaita/gtk-contained-dark.css | 12 +++++++-----
 gtk/theme/Adwaita/gtk-contained.css      | 12 +++++++-----
 4 files changed, 29 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 677e92d496..0bb55fee01 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -729,6 +729,9 @@ gtk_shortcuts_section_reflow_groups (GtkShortcutsSection *self)
   {
     GtkWidget *w;
 
+    gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self->switcher)),
+                                 "circular");
+
     for (w = gtk_widget_get_first_child (GTK_WIDGET (self->switcher));
          w != NULL;
          w = gtk_widget_get_next_sibling (w))
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 8701f5a007..8bd7f993ce 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1506,7 +1506,7 @@ headerbar {
   }
 
   /* Darken switchbuttons for headerbars. issue #1588 */
-  stackswitcher button:checked,
+  stackswitcher > button:checked,
   button.toggle:checked {
 
     background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%)));
@@ -4670,15 +4670,19 @@ shortcuts-section {
   caret-color: $drop_target_color;
 }
 
-stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
+stackswitcher > button.text-button { min-width: 100px; } // FIXME aggregate with buttons
 
-stackswitcher button.circular,
-stackswitcher button.text-button.circular { // FIXME aggregate with buttons
-  min-width: 32px;
-  min-height: 32px;
-  padding: 0;
-}
+stackswitcher.circular {
+  border-spacing: 12px;
 
+  // FIXME aggregate with buttons
+  > button.circular,
+  > button.text-button.circular {
+    min-width: 32px;
+    min-height: 32px;
+    padding: 0;
+  }
+}
 /*************
  * App Icons *
  *************/
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 8a8a258023..e0dfd79c20 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -625,11 +625,11 @@ searchbar > revealer > box { padding: 6px; border-width: 0 0 1px; }
 
 .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, .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, .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) 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); }
 
@@ -2025,9 +2025,11 @@ shortcuts-section { margin: 20px; }
 
 :not(decoration):not(window):drop(active):focus, :not(decoration):not(window):drop(active) { border-color: 
#4e9a06; box-shadow: inset 0 0 0 1px #4e9a06; caret-color: #4e9a06; }
 
-stackswitcher button.text-button { min-width: 100px; }
+stackswitcher > button.text-button { min-width: 100px; }
 
-stackswitcher button.circular, stackswitcher button.text-button.circular { min-width: 32px; min-height: 
32px; padding: 0; }
+stackswitcher.circular { border-spacing: 12px; }
+
+stackswitcher.circular > button.circular, stackswitcher.circular > button.text-button.circular { min-width: 
32px; min-height: 32px; padding: 0; }
 
 /************* App Icons * */
 /* Outline for low res icons */
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 8c57d55723..4504c1f56f 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -633,11 +633,11 @@ searchbar > revealer > box { padding: 6px; border-width: 0 0 1px; }
 
 .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, .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, .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) 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); }
 
@@ -2041,9 +2041,11 @@ shortcuts-section { margin: 20px; }
 
 :not(decoration):not(window):drop(active):focus, :not(decoration):not(window):drop(active) { border-color: 
#4e9a06; box-shadow: inset 0 0 0 1px #4e9a06; caret-color: #4e9a06; }
 
-stackswitcher button.text-button { min-width: 100px; }
+stackswitcher > button.text-button { min-width: 100px; }
 
-stackswitcher button.circular, stackswitcher button.text-button.circular { min-width: 32px; min-height: 
32px; padding: 0; }
+stackswitcher.circular { border-spacing: 12px; }
+
+stackswitcher.circular > button.circular, stackswitcher.circular > button.text-button.circular { min-width: 
32px; min-height: 32px; padding: 0; }
 
 /************* App Icons * */
 /* Outline for low res icons */


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