[gnome-builder] gui: switch workspaces to IdeSearchButton



commit 440af87f03af3c4d28339cf4d4682639131931e1
Author: Christian Hergert <chergert redhat com>
Date:   Mon Apr 22 14:44:57 2019 -0700

    gui: switch workspaces to IdeSearchButton
    
    This uses the new IdeSearchButton widget to allow the headerbar to
    shrink more, and then expand as necessary for search.
    
    One possibly interesting future direction for this widget is for it
    to expand using a new window layered over the entry so that no space
    is required from a headerbar.

 src/libide/editor/ide-editor-workspace.ui | 17 +++++++++--------
 src/libide/gui/ide-primary-workspace.ui   | 18 +++++++++---------
 src/plugins/vim/keybindings/vim.css       |  2 +-
 3 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-workspace.ui b/src/libide/editor/ide-editor-workspace.ui
index 85dd81710..12c108daa 100644
--- a/src/libide/editor/ide-editor-workspace.ui
+++ b/src/libide/editor/ide-editor-workspace.ui
@@ -25,17 +25,18 @@
           <object class="DzlPriorityBox">
             <property name="visible">true</property>
             <child>
-              <object class="IdeSearchEntry" id="search_entry">
-                <property name="primary-icon-name">edit-find-symbolic</property>
-                <property name="placeholder-text" translatable="yes">Press Ctrl+. to search</property>
-                <property name="width-chars">5</property>
-                <property name="max-width-chars">24</property>
+              <object class="IdeSearchButton" id="search_button">
+                <property name="tooltip-text" translatable="yes">Press Ctrl+. to search</property>
                 <property name="visible">true</property>
+                <child internal-child="entry">
+                  <object class="DzlSuggestionEntry">
+                    <property name="max-width-chars">20</property>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="pack-type">end</property>
-                <property name="padding">6</property>
-                <property name="priority">-100</property>
+                <property name="priority">-200</property>
               </packing>
             </child>
             <child>
@@ -45,7 +46,7 @@
               </object>
               <packing>
                 <property name="pack-type">end</property>
-                <property name="priority">-200</property>
+                <property name="priority">-300</property>
               </packing>
             </child>
           </object>
diff --git a/src/libide/gui/ide-primary-workspace.ui b/src/libide/gui/ide-primary-workspace.ui
index 10815dc56..e280fdfac 100644
--- a/src/libide/gui/ide-primary-workspace.ui
+++ b/src/libide/gui/ide-primary-workspace.ui
@@ -42,19 +42,19 @@
           </object>
         </child>
         <child type="right">
-          <object class="IdeNotificationsButton" id="notifications_button">
-            <property name="show-theatric">false</property>
+          <object class="IdeSearchButton" id="search_button">
+            <property name="tooltip-text" translatable="yes">Press Ctrl+. to search</property>
             <property name="visible">true</property>
+            <child internal-child="entry">
+              <object class="DzlSuggestionEntry">
+                <property name="max-width-chars">20</property>
+              </object>
+            </child>
           </object>
         </child>
         <child type="right">
-          <object class="IdeSearchEntry" id="search_entry">
-            <property name="margin-start">6</property>
-            <property name="margin-end">6</property>
-            <property name="primary-icon-name">edit-find-symbolic</property>
-            <property name="placeholder-text" translatable="yes">Press Ctrl+. to search</property>
-            <property name="width-chars">5</property>
-            <property name="max-width-chars">24</property>
+          <object class="IdeNotificationsButton" id="notifications_button">
+            <property name="show-theatric">false</property>
             <property name="visible">true</property>
           </object>
         </child>
diff --git a/src/plugins/vim/keybindings/vim.css b/src/plugins/vim/keybindings/vim.css
index 7b19375c3..0b4e2fe88 100644
--- a/src/plugins/vim/keybindings/vim.css
+++ b/src/plugins/vim/keybindings/vim.css
@@ -2557,7 +2557,7 @@ bind "KP_Multiply" { "save-insert-mark" ()
 
 @binding-set builder-vim-global-search
 {
-  bind "Escape" { "unfocus" () };
+  bind "Escape" { "action" ("search", "unfocus", "") };
   bind "Return" { "activate-suggestion" () };
 
   bind "Up" { "move-suggestion" (-1) };


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