window: Turn search button into a DzlSuggestionButton

Gives us a nice, smooth and sweet animation.
This commit is contained in:
Georges Basile Stavracas Neto
2019-04-29 17:08:51 -03:00
parent f5741eaaea
commit 36f4809c1c
5 changed files with 159 additions and 146 deletions
+1 -30
View File
@@ -22,28 +22,6 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSearchBar" id="search_bar">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="show_close_button">True</property>
<property name="search-mode-enabled" bind-source="search_button" bind-property="active" bind-flags="bidirectional"/>
<signal name="notify::search-mode-enabled" handler="search_toggled" object="GcalWindow" swapped="no"/>
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="width_request">500</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<signal name="search-changed" handler="search_changed" object="GcalWindow" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="GtkStack" id="views_stack">
<property name="visible">True</property>
@@ -281,17 +259,11 @@
</packing>
</child>
<child>
<object class="GtkToggleButton" id="search_button">
<object class="GcalSearchButton" id="search_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="tooltip">Search for events</property>
<child>
<object class="GtkImage" id="search_button_image">
<property name="visible">True</property>
<property name="icon_name">edit-find-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
@@ -301,7 +273,6 @@
</child>
</template>
<object class="GcalSearchPopover" id="search_popover">
<property name="relative_to">search_entry</property>
<property name="position">bottom</property>
<signal name="event-activated" handler="search_event_selected" object="GcalWindow" swapped="no"/>
</object>