[dconf-editor] Add an icon next to dconf-only keys.



commit 9f8fa42ce9c3e73eb2d4f021a93e3f659e681aa7
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Dec 12 15:55:32 2017 +0100

    Add an icon next to dconf-only keys.

 editor/dconf-editor.css      |   12 +++++++-----
 editor/key-list-box-row.vala |    6 ++++++
 2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index e301226..52173d1 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -140,7 +140,7 @@
                                                 .keys-list:dir(ltr) > row  grid > label { padding-right: 
0.5em; }
                                                 .keys-list:dir(rtl) > row  grid > label { padding-left:  
0.5em; }
 
-/* pending change icon */
+/* key icons */
 
                                                 .keys-list          > row > .key         { 
transition:background-position 0.3s,
                                                                                                       
background-size     0.3s;
@@ -148,15 +148,17 @@
                                                                                            
background-size:1.5rem; }
                           .small-keys-list-rows .keys-list          > row > .key         { 
background-size:1rem; }
 
-                                                .keys-list          > row > .key.delayed       { 
background-image:-gtk-icontheme("document-open-recent-symbolic"); }
-                                                .keys-list          > row > .key.delayed.erase { 
background-image:-gtk-icontheme("user-trash-symbolic"); }
-                                                .keys-list          > row > .key.erase         { 
background-image:-gtk-icontheme("action-unavailable-symbolic"); }
-
                                                 .keys-list:dir(ltr) > row > .key         { 
background-position:            0.75rem  center; }
                                                 .keys-list:dir(rtl) > row > .key         { 
background-position:calc(100% - 0.75rem) center; }
                           .small-keys-list-rows .keys-list:dir(ltr) > row > .key         { 
background-position:            0.75rem  center; }
                           .small-keys-list-rows .keys-list:dir(rtl) > row > .key         { 
background-position:calc(100% - 0.75rem) center; }
 
+/* icons */
+.keys-list > row >                 .key.delayed { 
background-image:-gtk-icontheme("document-open-recent-symbolic"); }
+.keys-list > row >       .dconf-key.key         { 
background-image:-gtk-icontheme("dialog-question-symbolic"); }
+.keys-list > row > .erase.dconf-key.key.delayed { background-image:-gtk-icontheme("user-trash-symbolic"); }
+.keys-list > row > .erase.dconf-key.key         { 
background-image:-gtk-icontheme("action-unavailable-symbolic"); }
+
 /*\
 * * pathbar
 \*/
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index 841e336..993f766 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -294,6 +294,9 @@ private class KeyListBoxRowEditableNoSchema : KeyListBoxRow
 
     construct
     {
+        StyleContext main_context = get_style_context ();
+        main_context.add_class ("dconf-key");
+
         if (boolean_switch != null)
             ((!) boolean_switch).notify ["active"].connect (() => key.value = new Variant.boolean (((!) 
boolean_switch).get_active ()));
 
@@ -418,6 +421,9 @@ private class KeyListBoxRowEditable : KeyListBoxRow
 
     construct
     {
+//        StyleContext main_context = get_style_context ();
+//        main_context.add_class ("gsettings-key");
+
         if (boolean_switch != null)
             boolean_switch_toggled_handler = ((!) boolean_switch).notify ["active"].connect (() => {
                     bool boolean = ((!) boolean_switch).get_active ();


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