| 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="AdwDemoPageCarousel" 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="GtkBox" id="box"> |
| 15 |
<property name="orientation">vertical</property> |
| 16 |
<child> |
| 17 |
<object class="GtkBox" id="empty_box"/> |
| 18 |
</child> |
| 19 |
<child> |
| 20 |
<object class="AdwCarousel" id="carousel"> |
| 21 |
<property name="vexpand">True</property> |
| 22 |
<property name="hexpand">True</property> |
| 23 |
<property name="allow-scroll-wheel" bind-source="scroll_wheel" bind-property="active" bind-flags="sync-create|bidirectional"/> |
| 24 |
<property name="allow-long-swipes" bind-source="long_swipes" bind-property="active" bind-flags="sync-create|bidirectional"/> |
| 25 |
<child> |
| 26 |
<object class="AdwStatusPage"> |
| 27 |
<property name="icon-name">widget-carousel-symbolic</property> |
| 28 |
<property name="title" translatable="yes">Carousel</property> |
| 29 |
<property name="description" translatable="yes">A widget for paginated scrolling</property> |
| 30 |
<property name="vexpand">True</property> |
| 31 |
</object> |
| 32 |
</child> |
| 33 |
<child> |
| 34 |
<object class="AdwClamp"> |
| 35 |
<property name="margin-bottom">32</property> |
| 36 |
<property name="margin-start">12</property> |
| 37 |
<property name="margin-end">12</property> |
| 38 |
<property name="maximum-size">400</property> |
| 39 |
<property name="tightening-threshold">300</property> |
| 40 |
<property name="valign">center</property> |
| 41 |
<property name="child"> |
| 42 |
<object class="AdwPreferencesGroup"> |
| 43 |
<child> |
| 44 |
<object class="AdwComboRow" id="orientation_row"> |
| 45 |
<property name="title" translatable="yes">Orientation</property> |
| 46 |
<signal name="notify::selected" handler="notify_orientation_cb" swapped="yes"/> |
| 47 |
<property name="model"> |
| 48 |
<object class="AdwEnumListModel"> |
| 49 |
<property name="enum-type">GtkOrientation</property> |
| 50 |
</object> |
| 51 |
</property> |
| 52 |
<property name="expression"> |
| 53 |
<closure type="gchararray" function="get_orientation_name"/> |
| 54 |
</property> |
| 55 |
</object> |
| 56 |
</child> |
| 57 |
<child> |
| 58 |
<object class="AdwComboRow" id="indicators_row"> |
| 59 |
<property name="title" translatable="yes">Page Indicators</property> |
| 60 |
<signal name="notify::selected" handler="notify_indicators_cb" swapped="yes"/> |
| 61 |
<property name="model"> |
| 62 |
<object class="GtkStringList"> |
| 63 |
<items> |
| 64 |
<item>dots</item> |
| 65 |
<item>lines</item> |
| 66 |
</items> |
| 67 |
</object> |
| 68 |
</property> |
| 69 |
<property name="expression"> |
| 70 |
<closure type="gchararray" function="get_indicators_name"/> |
| 71 |
</property> |
| 72 |
</object> |
| 73 |
</child> |
| 74 |
<child> |
| 75 |
<object class="AdwSwitchRow" id="scroll_wheel"> |
| 76 |
<property name="title" translatable="yes">Scroll Wheel</property> |
| 77 |
<property name="active">True</property> |
| 78 |
</object> |
| 79 |
</child> |
| 80 |
<child> |
| 81 |
<object class="AdwSwitchRow" id="long_swipes"> |
| 82 |
<property name="title" translatable="yes">Long Swipes</property> |
| 83 |
</object> |
| 84 |
</child> |
| 85 |
</object> |
| 86 |
</property> |
| 87 |
</object> |
| 88 |
</child> |
| 89 |
<child> |
| 90 |
<object class="AdwStatusPage"> |
| 91 |
<property name="title" translatable="yes">Another Page</property> |
| 92 |
<property name="hexpand">True</property> |
| 93 |
<property name="child"> |
| 94 |
<object class="GtkButton"> |
| 95 |
<property name="label" translatable="yes">_Return to the First Page</property> |
| 96 |
<property name="can-shrink">True</property> |
| 97 |
<property name="use-underline">True</property> |
| 98 |
<property name="halign">center</property> |
| 99 |
<property name="action-name">carousel.return</property> |
| 100 |
<style> |
| 101 |
<class name="suggested-action"/> |
| 102 |
<class name="pill"/> |
| 103 |
</style> |
| 104 |
</object> |
| 105 |
</property> |
| 106 |
</object> |
| 107 |
</child> |
| 108 |
</object> |
| 109 |
</child> |
| 110 |
<child> |
| 111 |
<object class="GtkStack" id="indicators_stack"> |
| 112 |
<property name="vhomogeneous">False</property> |
| 113 |
<property name="margin-top">6</property> |
| 114 |
<property name="margin-bottom">6</property> |
| 115 |
<property name="margin-start">6</property> |
| 116 |
<property name="margin-end">6</property> |
| 117 |
<child> |
| 118 |
<object class="GtkStackPage"> |
| 119 |
<property name="name">dots</property> |
| 120 |
<property name="child"> |
| 121 |
<object class="AdwCarouselIndicatorDots"> |
| 122 |
<property name="carousel">carousel</property> |
| 123 |
<property name="orientation" bind-source="carousel" bind-property="orientation" bind-flags="sync-create"/> |
| 124 |
</object> |
| 125 |
</property> |
| 126 |
</object> |
| 127 |
</child> |
| 128 |
<child> |
| 129 |
<object class="GtkStackPage"> |
| 130 |
<property name="name">lines</property> |
| 131 |
<property name="child"> |
| 132 |
<object class="AdwCarouselIndicatorLines"> |
| 133 |
<property name="carousel">carousel</property> |
| 134 |
<property name="orientation" bind-source="carousel" bind-property="orientation" bind-flags="sync-create"/> |
| 135 |
</object> |
| 136 |
</property> |
| 137 |
</object> |
| 138 |
</child> |
| 139 |
</object> |
| 140 |
</child> |
| 141 |
</object> |
| 142 |
</property> |
| 143 |
</object> |
| 144 |
</property> |
| 145 |
</template> |
| 146 |
<object class="GtkSizeGroup"> |
| 147 |
<property name="mode">both</property> |
| 148 |
<widgets> |
| 149 |
<widget name="empty_box"/> |
| 150 |
<widget name="indicators_stack"/> |
| 151 |
</widgets> |
| 152 |
</object> |
| 153 |
</interface> |