|
30 | 30 | </menu>
|
31 | 31 | <template class="TodoWindow" parent="AdwApplicationWindow">
|
32 | 32 | <property name="title" translatable="yes">To-Do</property>
|
33 |
| - <property name="default_width">650</property> |
34 |
| - <property name="default_height">550</property> |
| 33 | + <property name="width-request">360</property> |
| 34 | + <property name="height-request">200</property> |
| 35 | + <child> |
| 36 | + <object class="AdwBreakpoint"> |
| 37 | + <condition>max-width: 500sp</condition> |
| 38 | + <setter object="split_view" property="collapsed">True</setter> |
| 39 | + </object> |
| 40 | + </child> |
35 | 41 | <property name="content">
|
36 |
| - <object class="AdwLeaflet" id="leaflet"> |
37 |
| - <property name="can-navigate-back">True</property> |
38 |
| - <child> |
39 |
| - <object class="GtkBox"> |
40 |
| - <property name="orientation">vertical</property> |
41 |
| - <property name="width-request">200</property> |
42 |
| - <child> |
43 |
| - <object class="AdwHeaderBar"> |
44 |
| - <binding name="show-end-title-buttons"> |
45 |
| - <lookup name="folded">leaflet</lookup> |
46 |
| - </binding> |
47 |
| - <child type="start"> |
48 |
| - <object class="GtkToggleButton"> |
49 |
| - <property name="icon-name">list-add-symbolic</property> |
50 |
| - <property name="tooltip-text" translatable="yes">New Collection</property> |
51 |
| - <property name="action-name">win.new-collection</property> |
| 42 | + <object class="AdwNavigationSplitView" id="split_view"> |
| 43 | + <property name="min-sidebar-width">200</property> |
| 44 | + <property name="sidebar"> |
| 45 | + <object class="AdwNavigationPage"> |
| 46 | + <property name="title" bind-source="TodoWindow" |
| 47 | + bind-property="title" bind-flags="sync-create" /> |
| 48 | + <property name="child"> |
| 49 | + <object class="AdwToolbarView"> |
| 50 | + <child type="top"> |
| 51 | + <object class="AdwHeaderBar"> |
| 52 | + <child type="start"> |
| 53 | + <object class="GtkToggleButton"> |
| 54 | + <property name="icon-name">list-add-symbolic</property> |
| 55 | + <property name="tooltip-text" translatable="yes">New Collection</property> |
| 56 | + <property name="action-name">win.new-collection</property> |
| 57 | + </object> |
| 58 | + </child> |
52 | 59 | </object>
|
53 | 60 | </child>
|
54 |
| - </object> |
55 |
| - </child> |
56 |
| - <child> |
57 |
| - <object class="GtkScrolledWindow"> |
58 |
| - <property name="vexpand">True</property> |
59 |
| - <property name="child"> |
60 |
| - <object class="GtkListBox" id="collections_list"> |
61 |
| - <style> |
62 |
| - <class name="navigation-sidebar" /> |
63 |
| - </style> |
| 61 | + <property name="content"> |
| 62 | + <object class="GtkScrolledWindow"> |
| 63 | + <property name="child"> |
| 64 | + <object class="GtkListBox" id="collections_list"> |
| 65 | + <style> |
| 66 | + <class name="navigation-sidebar" /> |
| 67 | + </style> |
| 68 | + </object> |
| 69 | + </property> |
64 | 70 | </object>
|
65 | 71 | </property>
|
66 | 72 | </object>
|
67 |
| - </child> |
68 |
| - </object> |
69 |
| - </child> |
70 |
| - <child> |
71 |
| - <object class="AdwLeafletPage"> |
72 |
| - <property name="navigatable">False</property> |
73 |
| - <property name="child"> |
74 |
| - <object class="GtkSeparator" /> |
75 | 73 | </property>
|
76 | 74 | </object>
|
77 |
| - </child> |
78 |
| - <child> |
79 |
| - <object class="GtkBox"> |
80 |
| - <property name="orientation">vertical</property> |
81 |
| - <property name="hexpand">True</property> |
82 |
| - <property name="width-request">250</property> |
83 |
| - <child> |
84 |
| - <object class="AdwHeaderBar"> |
85 |
| - <property name="title-widget"> |
86 |
| - <object class="AdwWindowTitle" /> |
87 |
| - </property> |
88 |
| - <child type="start"> |
89 |
| - <object class="GtkButton" id="back_button"> |
90 |
| - <binding name="visible"> |
91 |
| - <lookup name="folded">leaflet</lookup> |
92 |
| - </binding> |
93 |
| - <property name="icon-name">go-previous-symbolic</property> |
94 |
| - <property name="tooltip-text" translatable="yes">Back</property> |
95 |
| - </object> |
96 |
| - </child> |
97 |
| - <child type="end"> |
98 |
| - <object class="GtkMenuButton"> |
99 |
| - <property name="icon-name">open-menu-symbolic</property> |
100 |
| - <property name="menu-model">main-menu</property> |
101 |
| - <property name="tooltip-text" translatable="yes">Main Menu</property> |
| 75 | + </property> |
| 76 | + <property name="content"> |
| 77 | + <object class="AdwNavigationPage"> |
| 78 | + <property name="title" translatable="yes">Tasks</property> |
| 79 | + <property name="child"> |
| 80 | + <object class="AdwToolbarView"> |
| 81 | + <child type="top"> |
| 82 | + <object class="AdwHeaderBar"> |
| 83 | + <property name="show-title">False</property> |
| 84 | + <child type="end"> |
| 85 | + <object class="GtkMenuButton"> |
| 86 | + <property name="icon-name">open-menu-symbolic</property> |
| 87 | + <property name="menu-model">main-menu</property> |
| 88 | + <property name="tooltip-text" translatable="yes">Main Menu</property> |
| 89 | + </object> |
| 90 | + </child> |
102 | 91 | </object>
|
103 | 92 | </child>
|
104 |
| - </object> |
105 |
| - </child> |
106 |
| - <child> |
107 |
| - <object class="GtkScrolledWindow"> |
108 |
| - <property name="vexpand">True</property> |
109 |
| - <property name="child"> |
110 |
| - <object class="AdwClamp"> |
| 93 | + <property name="content"> |
| 94 | + <object class="GtkScrolledWindow"> |
111 | 95 | <property name="child">
|
112 |
| - <object class="GtkBox"> |
113 |
| - <property name="orientation">vertical</property> |
114 |
| - <property name="margin-top">12</property> |
115 |
| - <property name="margin-bottom">12</property> |
116 |
| - <property name="margin-start">12</property> |
117 |
| - <property name="margin-end">12</property> |
118 |
| - <property name="spacing">12</property> |
119 |
| - <child> |
120 |
| - <object class="GtkEntry" id="entry"> |
121 |
| - <property name="placeholder-text" translatable="yes">Enter a Task…</property> |
122 |
| - <property name="secondary-icon-name">list-add-symbolic</property> |
| 96 | + <object class="AdwClamp"> |
| 97 | + <property name="maximum-size">400</property> |
| 98 | + <property name="tightening-threshold">300</property> |
| 99 | + <property name="child"> |
| 100 | + <object class="GtkBox"> |
| 101 | + <property name="orientation">vertical</property> |
| 102 | + <property name="margin-start">12</property> |
| 103 | + <property name="margin-end">12</property> |
| 104 | + <property name="spacing">12</property> |
| 105 | + <child> |
| 106 | + <object class="GtkEntry" id="entry"> |
| 107 | + <property name="placeholder-text" translatable="yes">Enter a Task…</property> |
| 108 | + <property name="secondary-icon-name">list-add-symbolic</property> |
| 109 | + </object> |
| 110 | + </child> |
| 111 | + <child> |
| 112 | + <object class="GtkListBox" id="tasks_list"> |
| 113 | + <property name="visible">False</property> |
| 114 | + <property name="selection-mode">none</property> |
| 115 | + <style> |
| 116 | + <class name="boxed-list" /> |
| 117 | + </style> |
| 118 | + </object> |
| 119 | + </child> |
123 | 120 | </object>
|
124 |
| - </child> |
125 |
| - <child> |
126 |
| - <object class="GtkListBox" id="tasks_list"> |
127 |
| - <property name="visible">False</property> |
128 |
| - <property name="selection-mode">none</property> |
129 |
| - <style> |
130 |
| - <class name="boxed-list" /> |
131 |
| - </style> |
132 |
| - </object> |
133 |
| - </child> |
| 121 | + </property> |
134 | 122 | </object>
|
135 | 123 | </property>
|
136 | 124 | </object>
|
137 | 125 | </property>
|
138 | 126 | </object>
|
139 |
| - </child> |
| 127 | + </property> |
140 | 128 | </object>
|
141 |
| - </child> |
| 129 | + </property> |
142 | 130 | </object>
|
143 | 131 | </property>
|
144 | 132 | </template>
|
|
0 commit comments