| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<interface> |
| 3 |
<requires lib="gtk" version="4.0"/> |
| 4 |
<requires lib="libadwaita" version="1.0"/> |
| 5 |
<template class="AdwDemoPageAvatar" parent="AdwBin"> |
| 6 |
<property name="child"> |
| 7 |
<object class="AdwToolbarView"> |
| 8 |
<child type="top"> |
| 9 |
<object class="AdwHeaderBar"> |
| 10 |
<property name="show-title">False</property> |
| 11 |
</object> |
| 12 |
</child> |
| 13 |
<property name="content"> |
| 14 |
<object class="GtkScrolledWindow"> |
| 15 |
<property name="hscrollbar-policy">never</property> |
| 16 |
<property name="child"> |
| 17 |
<object class="GtkBox"> |
| 18 |
<property name="orientation">vertical</property> |
| 19 |
<property name="valign">start</property> |
| 20 |
<style> |
| 21 |
<class name="avatar-page"/> |
| 22 |
</style> |
| 23 |
<child> |
| 24 |
<object class="GtkBox"> |
| 25 |
<property name="orientation">vertical</property> |
| 26 |
<child> |
| 27 |
<object class="AdwAvatar" id="avatar"> |
| 28 |
<property name="valign">center</property> |
| 29 |
<property name="size" bind-source="size" bind-property="value" bind-flags="sync-create"></property> |
| 30 |
<property name="show-initials" bind-source="show_initials" bind-property="active" bind-flags="sync-create"/> |
| 31 |
<property name="text" bind-source="text" bind-property="text" bind-flags="sync-create"/> |
| 32 |
<property name="margin-bottom">36</property> |
| 33 |
</object> |
| 34 |
</child> |
| 35 |
<child> |
| 36 |
<object class="GtkLabel"> |
| 37 |
<property name="label" translatable="yes">Avatar</property> |
| 38 |
<property name="wrap">True</property> |
| 39 |
<property name="wrap-mode">word-char</property> |
| 40 |
<property name="justify">center</property> |
| 41 |
<style> |
| 42 |
<class name="title"/> |
| 43 |
<class name="title-1"/> |
| 44 |
</style> |
| 45 |
</object> |
| 46 |
</child> |
| 47 |
<child> |
| 48 |
<object class="GtkLabel"> |
| 49 |
<property name="label" translatable="yes">A user avatar with generated fallback</property> |
| 50 |
<property name="justify">center</property> |
| 51 |
<property name="use-markup">true</property> |
| 52 |
<property name="wrap">True</property> |
| 53 |
<style> |
| 54 |
<class name="body"/> |
| 55 |
<class name="description"/> |
| 56 |
</style> |
| 57 |
</object> |
| 58 |
</child> |
| 59 |
</object> |
| 60 |
</child> |
| 61 |
<child> |
| 62 |
<object class="AdwClamp"> |
| 63 |
<property name="maximum-size">400</property> |
| 64 |
<property name="tightening-threshold">300</property> |
| 65 |
<property name="child"> |
| 66 |
<object class="GtkBox"> |
| 67 |
<property name="valign">center</property> |
| 68 |
<property name="orientation">vertical</property> |
| 69 |
<property name="spacing">12</property> |
| 70 |
<child> |
| 71 |
<object class="AdwPreferencesGroup"> |
| 72 |
<child> |
| 73 |
<object class="AdwEntryRow" id="text"> |
| 74 |
<property name="title" translatable="yes">Text</property> |
| 75 |
<property name="input-purpose">name</property> |
| 76 |
<property name="input-hints">no-spellcheck | uppercase-words</property> |
| 77 |
</object> |
| 78 |
</child> |
| 79 |
<child> |
| 80 |
<object class="AdwSwitchRow" id="show_initials"> |
| 81 |
<property name="title" translatable="yes">Show Initials</property> |
| 82 |
<property name="active">True</property> |
| 83 |
</object> |
| 84 |
</child> |
| 85 |
<child> |
| 86 |
<object class="AdwActionRow"> |
| 87 |
<property name="title" translatable="yes">File</property> |
| 88 |
<child> |
| 89 |
<object class="GtkButton"> |
| 90 |
<property name="valign">center</property> |
| 91 |
<property name="action-name">avatar.open</property> |
| 92 |
<property name="child"> |
| 93 |
<object class="GtkBox"> |
| 94 |
<property name="spacing">6</property> |
| 95 |
<child> |
| 96 |
<object class="GtkImage"> |
| 97 |
<property name="icon-name">document-open-symbolic</property> |
| 98 |
</object> |
| 99 |
</child> |
| 100 |
<child> |
| 101 |
<object class="GtkLabel" id="file_chooser_label"> |
| 102 |
<property name="ellipsize">middle</property> |
| 103 |
</object> |
| 104 |
</child> |
| 105 |
</object> |
| 106 |
</property> |
| 107 |
</object> |
| 108 |
</child> |
| 109 |
<child> |
| 110 |
<object class="GtkButton"> |
| 111 |
<property name="valign">center</property> |
| 112 |
<property name="icon-name">user-trash-symbolic</property> |
| 113 |
<property name="action-name">avatar.remove</property> |
| 114 |
<style> |
| 115 |
<class name="flat"/> |
| 116 |
</style> |
| 117 |
</object> |
| 118 |
</child> |
| 119 |
</object> |
| 120 |
</child> |
| 121 |
<child> |
| 122 |
<object class="AdwSpinRow" id="size"> |
| 123 |
<property name="title" translatable="yes">Size</property> |
| 124 |
<property name="numeric">True</property> |
| 125 |
<property name="adjustment"> |
| 126 |
<object class="GtkAdjustment"> |
| 127 |
<property name="lower">24</property> |
| 128 |
<property name="upper">320</property> |
| 129 |
<property name="value">128</property> |
| 130 |
<property name="page-increment">8</property> |
| 131 |
<property name="step-increment">8</property> |
| 132 |
</object> |
| 133 |
</property> |
| 134 |
</object> |
| 135 |
</child> |
| 136 |
<child> |
| 137 |
<object class="AdwActionRow"> |
| 138 |
<property name="title" translatable="yes">Export to File</property> |
| 139 |
<child> |
| 140 |
<object class="GtkButton"> |
| 141 |
<property name="valign">center</property> |
| 142 |
<property name="icon-name">document-save-symbolic</property> |
| 143 |
<property name="action-name">avatar.save</property> |
| 144 |
<style> |
| 145 |
<class name="flat"/> |
| 146 |
</style> |
| 147 |
</object> |
| 148 |
</child> |
| 149 |
</object> |
| 150 |
</child> |
| 151 |
</object> |
| 152 |
</child> |
| 153 |
<child> |
| 154 |
<object class="GtkListBox" id="contacts"> |
| 155 |
<property name="selection-mode">none</property> |
| 156 |
<style> |
| 157 |
<class name="boxed-list"/> |
| 158 |
</style> |
| 159 |
</object> |
| 160 |
</child> |
| 161 |
</object> |
| 162 |
</property> |
| 163 |
</object> |
| 164 |
</child> |
| 165 |
</object> |
| 166 |
</property> |
| 167 |
</object> |
| 168 |
</property> |
| 169 |
</object> |
| 170 |
</property> |
| 171 |
</template> |
| 172 |
</interface> |