summaryrefslogtreecommitdiff
path: root/data/ui/contacts-avatar-selector.ui
blob: f09c6ec76af949bee055489c2ea26bffcc23937e (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
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="ContactsAvatarSelector" parent="GtkWindow">
    <property name="modal">True</property>
    <property name="default_width">400</property>
    <property name="default_height">400</property>
    <binding name="title">
      <lookup name="title">title_widget</lookup>
    </binding>

    <child>
      <object class='GtkShortcutController'>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'>Escape</property>
            <property name='action'>action(window.close)</property>
          </object>
        </child>
      </object>
    </child>

    <child type="titlebar">
      <object class="GtkHeaderBar">
        <property name="show-title-buttons">False</property>

        <child type="start">
          <object class="GtkButton">
            <property name="label" translatable="yes">_Cancel</property>
            <property name="use-underline">True</property>
            <property name="receives-default">True</property>
            <property name="action-name">window.close</property>
          </object>
        </child>

        <property name="title-widget">
          <object class="AdwWindowTitle" id="title_widget">
            <property name="title" translatable="yes">Select a new avatar</property>
          </object>
        </property>

        <child type="end">
          <object class="GtkButton" id="done_button">
            <property name="label" translatable="yes">_Done</property>
            <property name="use-underline">True</property>
            <property name="action-name">set-avatar</property>
            <style>
              <class name="suggested-action"/>
            </style>
          </object>
        </child>
      </object>
    </child>

    <child>
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkScrolledWindow">
            <property name="hscrollbar_policy">never</property>
            <property name="hexpand">True</property>
            <property name="vexpand">True</property>
            <child>
              <object class="GtkViewport">
                <property name="scroll-to-focus">True</property>
                <child>
                  <object class="GtkBox">
                    <property name="margin-start">10</property>
                    <property name="margin-end">10</property>
                    <property name="margin-top">10</property>
                    <property name="margin-bottom">10</property>
                    <property name="orientation">vertical</property>
                    <property name="spacing">10</property>
                    <child>
                      <object class="GtkFlowBox" id="thumbnail_grid">
                        <property name="column_spacing">5</property>
                        <property name="row_spacing">5</property>
                        <property name="max_children_per_line">8</property>
                        <property name="selection-mode">single</property>
                        <property name="homogeneous">True</property>
                        <property name="activate-on-single-click">False</property>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="GtkActionBar">
            <child>
              <object class="GtkButton" id="camera_button">
                <property name="visible">False</property>
                <property name="label" translatable="yes">Take a Picture…</property>
                <property name="receives_default">True</property>
                <signal name="clicked" handler="on_camera_button_clicked"/>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label" translatable="yes">Select a File…</property>
                <property name="receives_default">True</property>
                <signal name="clicked" handler="on_file_clicked"/>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>