Debian Codegraph @

demo/pages/animations/adw-demo-page-animations.ui

raw
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="AdwDemoPageAnimations" 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">center</property>
20 <style>
21 <class name="timed-animation-page"/>
22 </style>
23 <child>
24 <object class="GtkBox">
25 <property name="orientation">vertical</property>
26 <child>
27 <object class="AdwClamp">
28 <property name="maximum-size">400</property>
29 <property name="tightening-threshold">300</property>
30 <property name="child">
31 <object class="AdwBin" id="timed_animation_sample">
32 <property name="margin-bottom">36</property>
33 <property name="child">
34 <object class="AdwBin" id="timed_animation_widget">
35 <property name="halign">center</property>
36 <property name="valign">center</property>
37 <property name="name">animation-sample</property>
38 </object>
39 </property>
40 </object>
41 </property>
42 </object>
43 </child>
44 <child>
45 <object class="GtkLabel">
46 <property name="label" translatable="yes">Animations</property>
47 <property name="wrap">True</property>
48 <property name="wrap-mode">word-char</property>
49 <property name="justify">center</property>
50 <style>
51 <class name="title"/>
52 <class name="title-1"/>
53 </style>
54 </object>
55 </child>
56 <child>
57 <object class="GtkLabel">
58 <property name="label" translatable="yes">Simple transitions</property>
59 <property name="justify">center</property>
60 <property name="use_markup">true</property>
61 <property name="wrap">True</property>
62 <style>
63 <class name="body"/>
64 <class name="description"/>
65 </style>
66 </object>
67 </child>
68 </object>
69 </child>
70 <child>
71 <object class="GtkBox" id="timed_animation_button_box">
72 <property name="valign">center</property>
73 <property name="halign">center</property>
74 <property name="margin-top">30</property>
75 <property name="margin-bottom">30</property>
76 <property name="spacing">18</property>
77 <child>
78 <object class="GtkButton">
79 <property name="icon-name">media-skip-backward-symbolic</property>
80 <property name="valign">center</property>
81 <binding name="sensitive">
82 <closure type="gboolean" function="timed_animation_can_reset">
83 <lookup name="state" type="AdwAnimation">
84 <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
85 </lookup>
86 <lookup name="state" type="AdwAnimation">
87 <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
88 </lookup>
89 </closure>
90 </binding>
91 <signal name="clicked" handler="timed_animation_reset" swapped="true"/>
92 <style>
93 <class name="circular"/>
94 <class name="flat"/>
95 </style>
96 </object>
97 </child>
98 <child>
99 <object class="GtkButton">
100 <binding name="icon-name">
101 <closure type="gchararray" function="get_play_pause_icon_name">
102 <lookup name="state" type="AdwAnimation">
103 <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
104 </lookup>
105 <lookup name="state" type="AdwAnimation">
106 <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
107 </lookup>
108 </closure>
109 </binding>
110 <property name="width-request">48</property>
111 <property name="height-request">48</property>
112 <signal name="clicked" handler="timed_animation_play_pause" swapped="true"/>
113 <style>
114 <class name="circular"/>
115 <class name="suggested-action"/>
116 </style>
117 </object>
118 </child>
119 <child>
120 <object class="GtkButton">
121 <property name="icon-name">media-skip-forward-symbolic</property>
122 <property name="valign">center</property>
123 <binding name="sensitive">
124 <closure type="gboolean" function="timed_animation_can_skip">
125 <lookup name="state" type="AdwAnimation">
126 <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
127 </lookup>
128 <lookup name="state" type="AdwAnimation">
129 <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
130 </lookup>
131 </closure>
132 </binding>
133 <signal name="clicked" handler="timed_animation_skip" swapped="true"/>
134 <style>
135 <class name="circular"/>
136 <class name="flat"/>
137 </style>
138 </object>
139 </child>
140 </object>
141 </child>
142 <child>
143 <object class="AdwPreferencesGroup">
144 <child>
145 <object class="AdwInlineViewSwitcher">
146 <property name="stack">animation_preferences_stack</property>
147 <property name="homogeneous">True</property>
148 <property name="halign">center</property>
149 <property name="width-request">250</property>
150 <property name="margin-bottom">32</property>
151 </object>
152 </child>
153 </object>
154 </child>
155 <child>
156 <object class="AdwClamp">
157 <property name="maximum-size">400</property>
158 <property name="tightening-threshold">300</property>
159 <property name="child">
160 <object class="AdwViewStack" id="animation_preferences_stack">
161 <property name="vhomogeneous">False</property>
162 <property name="enable-transitions">True</property>
163 <signal name="notify::visible-child-name" handler="timed_animation_reset" swapped="true"/>
164 <child>
165 <object class="AdwViewStackPage">
166 <property name="title" translatable="yes">Timed</property>
167 <property name="name">Timed</property>
168 <property name="child">
169 <object class="AdwPreferencesGroup">
170 <property name="valign">start</property>
171 <child>
172 <object class="AdwComboRow" id="timed_animation_easing">
173 <property name="title" translatable="yes">Easing</property>
174 <property name="model">
175 <object class="AdwEnumListModel">
176 <property name="enum-type">AdwEasing</property>
177 </object>
178 </property>
179 <property name="expression">
180 <closure type="gchararray" function="animations_easing_name"/>
181 </property>
182 </object>
183 </child>
184 <child>
185 <object class="AdwSpinRow" id="timed_animation_duration">
186 <property name="title" translatable="yes">Duration</property>
187 <property name="numeric">True</property>
188 <property name="adjustment">
189 <object class="GtkAdjustment">
190 <property name="lower">100</property>
191 <property name="upper">4000</property>
192 <property name="value">500</property>
193 <property name="page-increment">100</property>
194 <property name="step-increment">50</property>
195 </object>
196 </property>
197 </object>
198 </child>
199 <child>
200 <object class="AdwSpinRow" id="timed_animation_repeat_count">
201 <property name="title" translatable="yes">Repeat Count</property>
202 <property name="numeric">True</property>
203 <property name="adjustment">
204 <object class="GtkAdjustment">
205 <property name="lower">0</property>
206 <property name="upper">10</property>
207 <property name="value">1</property>
208 <property name="page-increment">1</property>
209 <property name="step-increment">1</property>
210 </object>
211 </property>
212 </object>
213 </child>
214 <child>
215 <object class="AdwSwitchRow" id="timed_animation_reverse">
216 <property name="title" translatable="yes">Reverse</property>
217 </object>
218 </child>
219 <child>
220 <object class="AdwSwitchRow" id="timed_animation_alternate">
221 <property name="title" translatable="yes">Alternate</property>
222 </object>
223 </child>
224 </object>
225 </property>
226 </object>
227 </child>
228 <child>
229 <object class="AdwViewStackPage">
230 <property name="title" translatable="yes">Spring</property>
231 <property name="name">Spring</property>
232 <property name="child">
233 <object class="AdwPreferencesGroup">
234 <property name="valign">start</property>
235 <child>
236 <object class="AdwSpinRow" id="spring_animation_velocity">
237 <property name="title" translatable="yes">Initial Velocity</property>
238 <property name="numeric">True</property>
239 <property name="adjustment">
240 <object class="GtkAdjustment">
241 <property name="lower">-1000</property>
242 <property name="upper">1000</property>
243 <property name="value">0</property>
244 <property name="page-increment">10</property>
245 <property name="step-increment">1</property>
246 </object>
247 </property>
248 </object>
249 </child>
250 <child>
251 <object class="AdwSpinRow" id="spring_animation_damping">
252 <property name="title" translatable="yes">Damping</property>
253 <property name="numeric">True</property>
254 <property name="adjustment">
255 <object class="GtkAdjustment">
256 <property name="lower">0</property>
257 <property name="upper">1000</property>
258 <property name="value">10</property>
259 <property name="page-increment">10</property>
260 <property name="step-increment">1</property>
261 </object>
262 </property>
263 </object>
264 </child>
265 <child>
266 <object class="AdwSpinRow" id="spring_animation_mass">
267 <property name="title" translatable="yes">Mass</property>
268 <property name="numeric">True</property>
269 <property name="adjustment">
270 <object class="GtkAdjustment">
271 <property name="lower">0</property>
272 <property name="upper">100</property>
273 <property name="value">1</property>
274 <property name="page-increment">10</property>
275 <property name="step-increment">1</property>
276 </object>
277 </property>
278 <signal name="notify::value" handler="notify_spring_params_change" swapped="yes"/>
279 </object>
280 </child>
281 <child>
282 <object class="AdwSpinRow" id="spring_animation_stiffness">
283 <property name="title" translatable="yes">Stiffness</property>
284 <property name="numeric">True</property>
285 <property name="adjustment">
286 <object class="GtkAdjustment">
287 <property name="lower">0</property>
288 <property name="upper">1000</property>
289 <property name="value">100</property>
290 <property name="page-increment">10</property>
291 <property name="step-increment">1</property>
292 </object>
293 </property>
294 <signal name="notify::value" handler="notify_spring_params_change" swapped="yes"/>
295 </object>
296 </child>
297 <child>
298 <object class="AdwSpinRow" id="spring_animation_epsilon">
299 <property name="title" translatable="yes">Epsilon</property>
300 <property name="numeric">True</property>
301 <property name="digits">5</property>
302 <property name="adjustment">
303 <object class="GtkAdjustment">
304 <property name="lower">0.0001</property>
305 <property name="upper">0.01</property>
306 <property name="value">0.001</property>
307 <property name="page-increment">0.001</property>
308 <property name="step-increment">0.001</property>
309 </object>
310 </property>
311 </object>
312 </child>
313 <child>
314 <object class="AdwSwitchRow" id="spring_animation_clamp_switch">
315 <property name="title" translatable="yes">Clamp</property>
316 </object>
317 </child>
318 </object>
319 </property>
320 </object>
321 </child>
322 </object>
323 </property>
324 </object>
325 </child>
326 </object>
327 </property>
328 </object>
329 </property>
330 </object>
331 </property>
332 </template>
333 </interface>