summaryrefslogtreecommitdiff
path: root/src/gui/gcal-search-button.ui
blob: 2cf941f6fc2f393c92ed22c0626e1601a1caaad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?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="GtkSearchEntry" id="entry">
                <property name="max-width-chars">0</property>
                <property name="width-chars">0</property>
                <signal name="search-changed" handler="on_entry_search_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>