<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>
  <template class="AdwDemoPageAvatar" parent="AdwBin">
    <property name="child">
      <object class="GtkScrolledWindow">
        <property name="hscrollbar-policy">never</property>
        <property name="child">
          <object class="GtkViewport">
            <property name="scroll-to-focus">True</property>
            <property name="child">
              <object class="GtkBox">
                <property name="orientation">vertical</property>
                <property name="valign">start</property>
                <style>
                  <class name="avatar-page"/>
                </style>
                <child>
                  <object class="GtkBox">
                    <property name="orientation">vertical</property>
                    <child>
                      <object class="AdwAvatar" id="avatar">
                        <property name="valign">center</property>
                        <property name="size" bind-source="size" bind-property="value" bind-flags="sync-create"></property>
                        <property name="show-initials" bind-source="show_initials" bind-property="state" bind-flags="sync-create"/>
                        <property name="text" bind-source="text" bind-property="text" bind-flags="sync-create"/>
                        <property name="margin-bottom">36</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="label" translatable="yes">Avatar</property>
                        <property name="wrap">True</property>
                        <property name="wrap-mode">word-char</property>
                        <property name="justify">center</property>
                        <style>
                          <class name="title"/>
                          <class name="title-1"/>
                        </style>
                      </object>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="label" translatable="yes">A user avatar with generated fallback.</property>
                        <property name="justify">center</property>
                        <property name="use-markup">true</property>
                        <property name="wrap">True</property>
                        <style>
                          <class name="body"/>
                          <class name="description"/>
                        </style>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="AdwClamp">
                    <property name="maximum-size">400</property>
                    <property name="tightening-threshold">300</property>
                    <property name="child">
                      <object class="GtkBox">
                        <property name="valign">center</property>
                        <property name="orientation">vertical</property>
                        <property name="spacing">12</property>
                        <child>
                          <object class="AdwPreferencesGroup">
                            <child>
                              <object class="AdwActionRow">
                                <property name="title" translatable="yes">Text</property>
                                <child>
                                  <object class="GtkEntry" id="text">
                                    <property name="valign">center</property>
                                  </object>
                                </child>
                              </object>
                            </child>
                            <child>
                              <object class="AdwActionRow">
                                <property name="title" translatable="yes">Show Initials</property>
                                <property name="activatable-widget">show_initials</property>
                                <child>
                                  <object class="GtkSwitch" id="show_initials">
                                    <property name="valign">center</property>
                                    <property name="state">True</property>
                                  </object>
                                </child>
                              </object>
                            </child>
                            <child>
                              <object class="AdwActionRow">
                                <property name="title" translatable="yes">File</property>
                                <child>
                                  <object class="GtkButton">
                                    <property name="valign">center</property>
                                    <property name="action-name">avatar.open</property>
                                    <child>
                                      <object class="GtkBox">
                                        <property name="spacing">6</property>
                                        <child>
                                          <object class="GtkImage">
                                            <property name="icon-name">document-open-symbolic</property>
                                          </object>
                                        </child>
                                        <child>
                                          <object class="GtkLabel" id="file_chooser_label">
                                            <property name="ellipsize">middle</property>
                                          </object>
                                        </child>
                                      </object>
                                    </child>
                                  </object>
                                </child>
                                <child>
                                  <object class="GtkButton">
                                    <property name="valign">center</property>
                                    <property name="icon-name">user-trash-symbolic</property>
                                    <property name="action-name">avatar.remove</property>
                                    <style>
                                      <class name="flat"/>
                                    </style>
                                  </object>
                                </child>
                              </object>
                            </child>
                            <child>
                              <object class="AdwActionRow">
                                <property name="title" translatable="yes">Size</property>
                                <child>
                                  <object class="GtkSpinButton" id="size">
                                    <property name="valign">center</property>
                                    <property name="numeric">True</property>
                                    <property name="adjustment">
                                      <object class="GtkAdjustment">
                                        <property name="lower">24</property>
                                        <property name="upper">320</property>
                                        <property name="value">128</property>
                                        <property name="page-increment">8</property>
                                        <property name="step-increment">8</property>
                                      </object>
                                    </property>
                                  </object>
                                </child>
                              </object>
                            </child>
                            <child>
                              <object class="AdwActionRow">
                                <property name="title" translatable="yes">Export to File</property>
                                <child>
                                  <object class="GtkButton">
                                    <property name="valign">center</property>
                                    <property name="icon-name">avatar-save-symbolic</property>
                                    <property name="action-name">avatar.save</property>
                                    <style>
                                      <class name="flat"/>
                                    </style>
                                  </object>
                                </child>
                              </object>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="GtkListBox" id="contacts">
                            <property name="selection-mode">none</property>
                            <style>
                              <class name="boxed-list"/>
                            </style>
                          </object>
                        </child>
                      </object>
                    </property>
                  </object>
                </child>
              </object>
            </property>
          </object>
        </property>
      </object>
    </property>
  </template>
</interface>
