Files
federated-calendar/src/gui/gcal-search-button.ui
T

125 lines
4.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalSearchButton" parent="AdwBin">
<child>
<object class="GtkEventControllerFocus">
<signal name="leave" handler="on_focus_controller_leave_cb" object="GcalSearchButton" swapped="no" />
</object>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="hhomogeneous">False</property>
<property name="vhomogeneous">True</property>
<property name="interpolate-size">True</property>
<property name="transition-type">crossfade</property>
<property name="transition-duration">200</property>
<style>
<class name="suggestionbutton" />
</style>
<child>
<object class="GtkStackPage">
<property name="name">button</property>
<property name="child">
<object class="GtkButton" id="button">
<property name="halign">start</property>
<property name="icon-name">edit-find-symbolic</property>
<signal name="clicked" handler="on_button_clicked_cb" object="GcalSearchButton" swapped="no" />
<child>
<object class='GtkShortcutController'>
<property name='scope'>global</property>
<child>
<object class='GtkShortcut'>
<property name='trigger'>&lt;Control&gt;f</property>
<property name='action'>activate</property>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">entry</property>
<property name="child">
<object class="GtkEntry" id="entry">
<property name="max-width-chars">0</property>
<property name="primary-icon-name">edit-find-symbolic</property>
<property name="width-chars">0</property>
<signal name="icon-press" handler="on_entry_icon_pressed_cb" object="GcalSearchButton" swapped="no" />
<signal name="notify::text" handler="on_entry_text_changed_cb" object="GcalSearchButton" swapped="no" />
<child>
<object class='GtkShortcutController'>
<property name='scope'>local</property>
<child>
<object class='GtkShortcut'>
<property name='trigger'>Escape</property>
<property name='action'>action(unfocus)</property>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
</template>
<object class="GtkPopover" id="popover">
<property name="position">bottom</property>
<property name="autohide">False</property>
<property name="default-widget">results_listbox</property>
<signal name="closed" handler="on_popover_closed_cb" object="GcalSearchButton" swapped="no" />
<style>
<class name="menu" />
</style>
<child>
<object class="GtkRevealer" id="results_revealer">
<property name="transition-type">slide-down</property>
<signal name="notify::reveal-child" handler="on_results_revealer_child_reveal_state_changed_cb" object="GcalSearchButton" swapped="no" />
<signal name="notify::child-revealed" handler="on_results_revealer_child_reveal_state_changed_cb" object="GcalSearchButton" swapped="no" />
<child>
<object class="GtkScrolledWindow">
<property name="max-content-width">450</property>
<property name="max-content-height">400</property>
<property name="propagate-natural-width">True</property>
<property name="propagate-natural-height">True</property>
<property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport">
<property name="scroll-to-focus">True</property>
<property name="hscroll-policy">natural</property>
<property name="vscroll-policy">natural</property>
<child>
<object class="GtkListBox" id="results_listbox">
<property name="selection-mode">none</property>
<signal name="row-activated" handler="on_results_listbox_row_activated_cb" object="GcalSearchButton" swapped="no" />
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>