1<?xml version="1.0" encoding="UTF-8"?> 2<interface domain="libadwaita"> 3 <requires lib="gtk" version="4.0"/> 4 <template class="AdwExpanderRow" parent="AdwPreferencesRow"> 5 <!-- The row must not be activatable, to be sure it doesn't conflict with 6 clicking nested rows. --> 7 <property name="activatable">False</property> 8 <!-- The row must be focusable for keyboard navigation to work as 9 expected. --> 10 <property name="can-focus">True</property> 11 <!-- The row is focusable and can still be activated via keyboard, despite 12 being marked as inactivatable. Activating the row should toggle its 13 expansion. --> 14 <signal name="activate" handler="activate_cb" after="yes"/> 15 <style> 16 <class name="empty"/> 17 <class name="expander"/> 18 </style> 19 <child> 20 <object class="GtkBox" id="box"> 21 <property name="orientation">vertical</property> 22 <child> 23 <object class="GtkListBox"> 24 <property name="selection-mode">none</property> 25 <!-- The header row is focusable, activatable, and can be activated 26 by clicking it or via keyboard. Activating the row should 27 toggle its expansion. --> 28 <signal name="row-activated" handler="activate_cb" after="yes" swapped="yes"/> 29 <child> 30 <object class="AdwActionRow" id="action_row"> 31 <!-- The header row must be activatable to toggle expansion by 32 clicking it or via keyboard activation. --> 33 <property name="activatable">True</property> 34 <!-- The header row must be focusable for keyboard navigation to 35 work as expected. --> 36 <property name="can-focus">True</property> 37 <property name="title" bind-source="AdwExpanderRow" bind-property="title" bind-flags="sync-create"/> 38 <style> 39 <class name="header"/> 40 </style> 41 <child> 42 <object class="GtkBox" id="actions"> 43 <property name="spacing">12</property> 44 <property name="visible">False</property> 45 </object> 46 </child> 47 <child> 48 <object class="GtkSwitch" id="enable_switch"> 49 <property name="active" bind-source="AdwExpanderRow" bind-property="enable-expansion" bind-flags="bidirectional|sync-create"/> 50 <property name="valign">center</property> 51 <property name="visible" bind-source="AdwExpanderRow" bind-property="show-enable-switch" bind-flags="bidirectional|sync-create"/> 52 </object> 53 </child> 54 <child> 55 <object class="GtkImage" id="image"> 56 <property name="icon-name">adw-expander-arrow-symbolic</property> 57 <property name="sensitive" bind-source="AdwExpanderRow" bind-property="enable-expansion" bind-flags="sync-create"/> 58 <style> 59 <class name="expander-row-arrow"/> 60 </style> 61 </object> 62 </child> 63 </object> 64 </child> 65 </object> 66 </child> 67 <child> 68 <object class="GtkRevealer"> 69 <property name="reveal-child" bind-source="AdwExpanderRow" bind-property="expanded" bind-flags="sync-create"/> 70 <property name="transition-type">slide-up</property> 71 <child> 72 <object class="GtkListBox" id="list"> 73 <property name="selection-mode">none</property> 74 <style> 75 <class name="nested"/> 76 </style> 77 </object> 78 </child> 79 </object> 80 </child> 81 </object> 82 </child> 83 </template> 84</interface> 85