[dconf-editor] Less CSS magic.



commit 88b449f544e122d1ccfffe72f169eb6b3b8e6f94
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Feb 17 06:18:34 2018 +0100

    Less CSS magic.

 editor/dconf-editor.css |   16 ++++++++--------
 editor/dconf-editor.ui  |    1 -
 editor/pathbar.vala     |    5 +++++
 3 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index 8a1d7b4..b7214d0 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -146,9 +146,9 @@
 /* key icons */
 
                                    .keys-list          > row > .key         { transition:background-position 
0.3s,
-                                                                                                      
background-size     0.3s;
-                                                                                           
background-repeat:no-repeat;
-                                                                                           
background-size:1.5rem; }
+                                                                                         background-size     
0.3s;
+                                                                              background-repeat:no-repeat;
+                                                                              background-size:1.5rem; }
              .small-keys-list-rows .keys-list          > row > .key         { background-size:1rem; }
 
                                    .keys-list:dir(ltr) > row > .key         { background-position:           
 0.75rem  center; }
@@ -250,17 +250,17 @@
 }
 
 /* search changes */
-#search-toggle:checked ~ .pathbar {
+.pathbar.greyed-pathbar {
   color:@insensitive_fg_color;
 }
 
-#search-toggle:checked ~ .pathbar          > button.active       > .item,
-#search-toggle:checked ~ .pathbar          > button.active:hover > .item {
+.pathbar.greyed-pathbar          > button.active       > .item,
+.pathbar.greyed-pathbar          > button.active:hover > .item {
   border-bottom-color:alpha(currentColor,0.6);
 }
 
-#search-toggle:checked ~ .pathbar:backdrop > button.active       > .item,
-#search-toggle:checked ~ .pathbar:backdrop > button.active:hover > .item {
+.pathbar.greyed-pathbar:backdrop > button.active       > .item,
+.pathbar.greyed-pathbar:backdrop > button.active:hover > .item {
   border-bottom-color:alpha(currentColor,0.4);
 }
 
diff --git a/editor/dconf-editor.ui b/editor/dconf-editor.ui
index e189683..b128e20 100644
--- a/editor/dconf-editor.ui
+++ b/editor/dconf-editor.ui
@@ -53,7 +53,6 @@
             <property name="valign">center</property>
             <property name="active" bind-source="search_bar" bind-property="search-mode-enabled" 
bind-flags="bidirectional">False</property>
             <property name="focus-on-click">False</property>
-            <property name="name">search-toggle</property>
             <!-- <accelerator key="F" signal="toggled" modifiers="GDK_CONTROL_MASK"/> TODO -->
             <style>
               <class name="image-button"/>
diff --git a/editor/pathbar.vala b/editor/pathbar.vala
index 2d51a93..edc4b63 100644
--- a/editor/pathbar.vala
+++ b/editor/pathbar.vala
@@ -176,6 +176,11 @@ public class PathBar : Box
 
     private void update_cursors_for_search (string current_path, bool is_search)
     {
+        if (is_search)
+            get_style_context ().add_class ("greyed-pathbar");
+        else
+            get_style_context ().remove_class ("greyed-pathbar");
+
         @foreach ((child) => {
                 if (!(child is PathBarItem))
                     return;


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