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