[dconf-editor] Remove search icon on small screens.



commit aa57062fad90c7f108ad316f952ff7665a2b4d99
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Oct 18 17:09:12 2018 +0200

    Remove search icon on small screens.

 editor/dconf-editor.css | 13 +++++++++++++
 editor/pathentry.ui     |  3 +++
 editor/pathentry.vala   |  4 ++++
 3 files changed, 20 insertions(+)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index 2e57d50..43b0068 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -360,6 +360,19 @@ window:not(.extra-small-window)    .keys-list:dir(rtl) > row > .key    > grid >
   padding:0.2em 0.3em;
 }
 
+/*\
+* * search entry
+\*/
+
+.extra-small-window .search-entry:dir(rtl) > image.right,
+.extra-small-window .search-entry:dir(ltr) > image.left {
+  margin-left:0;
+  margin-right:0;
+  padding-left:0;
+  padding-right:0;
+  min-width:0;
+}
+
 /*\
 * * text formating
 \*/
diff --git a/editor/pathentry.ui b/editor/pathentry.ui
index 1f609d3..a1a31ee 100644
--- a/editor/pathentry.ui
+++ b/editor/pathentry.ui
@@ -13,6 +13,9 @@
         <property name="visible">True</property>
         <property name="hexpand">True</property>
         <!-- "next-match" (<ctrl>g) and "previous-match" (<ctrl>G) are handled in dconf-window.vala -->
+        <style>
+          <class name="search-entry"/>
+        </style>
       </object>
     </child>
     <!-- child>
diff --git a/editor/pathentry.vala b/editor/pathentry.vala
index b54110f..b0f7dcb 100644
--- a/editor/pathentry.vala
+++ b/editor/pathentry.vala
@@ -41,6 +41,8 @@ private class PathEntry : Box
 
             if (value)
             {
+                search_entry.set_icon_from_pixbuf (EntryIconPosition.PRIMARY, null);
+
                 can_reload_handler = reload_search_button.notify ["sensitive"].connect (() => {
                         if (reload_search_button.sensitive)
                         {
@@ -62,6 +64,8 @@ private class PathEntry : Box
             }
             else
             {
+                search_entry.set_icon_from_icon_name (EntryIconPosition.PRIMARY, "edit-find-symbolic");
+
                 reload_search_button.disconnect (can_reload_handler);
 
                 hide_search_button.hide ();


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