1
+ using Gtk 4.0;
2
+ using Adw 1;
3
+
4
+ menu actionsMenu {
5
+ item(_("TransferMoney"), "account.transferMoney")
6
+
7
+ section {
8
+ submenu {
9
+ label: _("ExportToFile");
10
+
11
+ item("CSV", "account.exportToCSV")
12
+ item("PDF", "account.exportToPDF")
13
+ }
14
+ item(_("ImportFromFile"), "account.importFromFile")
15
+ }
16
+
17
+ section {
18
+ item(_("AccountSettings"), "account.accountSettings")
19
+ }
20
+ }
21
+
22
+ Adw.Bin _root {
23
+ Adw.Flap _flap {
24
+ flap: Gtk.ScrolledWindow _paneScroll {
25
+ width-request: 360;
26
+
27
+ Gtk.Box {
28
+ orientation: vertical;
29
+ spacing: 10;
30
+ hexpand: false;
31
+ vexpand: true;
32
+ margin-start: 10;
33
+ margin-end: 10;
34
+ margin-top: 10;
35
+ margin-bottom: 10;
36
+
37
+ Gtk.SearchEntry _searchDescriptionEntry {
38
+ placeholder-text: _("SearchDescription.Placeholder");
39
+ }
40
+
41
+ Adw.PreferencesGroup {
42
+ title: _("Overview.Today");
43
+ header-suffix: Gtk.Box {
44
+ orientation: horizontal;
45
+ spacing: 6;
46
+
47
+ Gtk.MenuButton {
48
+ menu-model: actionsMenu;
49
+
50
+ Adw.ButtonContent {
51
+ icon-name: "document-properties-symbolic";
52
+ label: _("AccountActions");
53
+ }
54
+
55
+ styles ["flat"]
56
+ }
57
+
58
+ Gtk.Button _resetOverviewFilterButton {
59
+ icon-name: "larger-brush-symbolic";
60
+ tooltip-text: _("ResetFilters.Overview");
61
+
62
+ styles ["flat"]
63
+ }
64
+ };
65
+
66
+ Adw.ActionRow {
67
+ title: _("Total");
68
+
69
+ [suffix]
70
+ Gtk.Label _totalLabel {
71
+ valign: center;
72
+
73
+ styles ["denaro-total"]
74
+ }
75
+ }
76
+
77
+ Adw.ActionRow {
78
+ title: _("Income");
79
+
80
+ [prefix]
81
+ Gtk.CheckButton _incomeCheck {
82
+ active: true;
83
+ valign: center;
84
+
85
+ styles ["selection-mode"]
86
+ }
87
+
88
+ [suffix]
89
+ Gtk.Label _incomeLabel {
90
+ valign: center;
91
+
92
+ styles ["denaro-income"]
93
+ }
94
+ }
95
+
96
+ Adw.ActionRow {
97
+ title: _("Expense");
98
+
99
+ [prefix]
100
+ Gtk.CheckButton _expenseCheck {
101
+ active: true;
102
+ valign: center;
103
+
104
+ styles ["selection-mode"]
105
+ }
106
+
107
+ [suffix]
108
+ Gtk.Label _expenseLabel {
109
+ valign: center;
110
+
111
+ styles ["denaro-expense"]
112
+ }
113
+ }
114
+ }
115
+
116
+ Adw.PreferencesGroup {
117
+ title: _("Groups");
118
+ header-suffix: Gtk.Box {
119
+ Gtk.ToggleButton _toggleGroupsButton {
120
+ tooltip-text: _("ToggleGroups.Tooltip");
121
+
122
+ Adw.ButtonContent _toggleGroupsButtonContent {}
123
+
124
+ styles ["flat"]
125
+ }
126
+
127
+ Gtk.Button {
128
+ tooltip-text: _("NewGroup.Tooltip");
129
+ action-name: "account.newGroup";
130
+
131
+ Adw.ButtonContent {
132
+ icon-name: "list-add-symbolic";
133
+ label: _("New");
134
+ }
135
+
136
+ styles ["flat"]
137
+ }
138
+
139
+ Gtk.Button _resetGroupsFilterButton {
140
+ icon-name: "larger-brush-symbolic";
141
+ tooltip-text: _("ResetFilters.Groups");
142
+
143
+ styles ["flat"]
144
+ }
145
+ };
146
+
147
+ Gtk.ListBox _groupsList {
148
+ styles ["boxed-list"]
149
+ }
150
+ }
151
+
152
+ Adw.PreferencesGroup {
153
+ title: _("Calendar");
154
+ header-suffix: Gtk.Button _resetCalendarFilterButton {
155
+ icon-name: "larger-brush-symbolic";
156
+ tooltip-text: _("ResetFilters.Dates");
157
+
158
+ styles ["flat"]
159
+ };
160
+
161
+ Gtk.Calendar _calendar {
162
+ name: "calendarAccount";
163
+
164
+ styles ["card"]
165
+ }
166
+ }
167
+
168
+ Adw.PreferencesGroup {
169
+ Adw.ExpanderRow _rangeExpander {
170
+ title: _("SelectRange");
171
+ enable-expansion: false;
172
+ show-enable-switch: true;
173
+
174
+ Adw.ActionRow {
175
+ title: _("Start.DateRange");
176
+
177
+ [suffix]
178
+ Gtk.Box {
179
+ orientation: horizontal;
180
+ spacing: 6;
181
+
182
+ Gtk.DropDown _startYearDropDown {
183
+ valign: center;
184
+ show-arrow: false;
185
+ }
186
+
187
+ Gtk.DropDown _startMonthDropDown {
188
+ valign: center;
189
+ show-arrow: false;
190
+ }
191
+
192
+ Gtk.DropDown _startDayDropDown {
193
+ valign: center;
194
+ show-arrow: false;
195
+ }
196
+ }
197
+ }
198
+
199
+ Adw.ActionRow {
200
+ title: _("End.DateRange");
201
+
202
+ [suffix]
203
+ Gtk.Box {
204
+ orientation: horizontal;
205
+ spacing: 6;
206
+
207
+ Gtk.DropDown _endYearDropDown {
208
+ valign: center;
209
+ show-arrow: false;
210
+ }
211
+
212
+ Gtk.DropDown _endMonthDropDown {
213
+ valign: center;
214
+ show-arrow: false;
215
+ }
216
+
217
+ Gtk.DropDown _endDayDropDown {
218
+ valign: center;
219
+ show-arrow: false;
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
226
+
227
+ styles ["background"]
228
+ };
229
+ separator: Gtk.Separator {
230
+ orientation: vertical;
231
+ };
232
+
233
+ Gtk.Overlay {
234
+ vexpand: true;
235
+
236
+ Gtk.Overlay _mainOverlay {
237
+ vexpand: true;
238
+
239
+ Gtk.Box {
240
+ orientation: vertical;
241
+ hexpand: true;
242
+ vexpand: true;
243
+
244
+ Gtk.Box _transactionsHeaderBox {
245
+ orientation: horizontal;
246
+
247
+ Adw.PreferencesGroup _transactionsGroup {
248
+ title: _("Transactions");
249
+ margin-top: 7;
250
+ margin-start: 10;
251
+ margin-end: 10;
252
+ header-suffix: Gtk.Box {
253
+ orientation: horizontal;
254
+ spacing: 6;
255
+
256
+ Gtk.DropDown _sortTransactionByDropDown {}
257
+
258
+ Gtk.Box {
259
+ orientation: horizontal;
260
+ valign: center;
261
+
262
+ Gtk.ToggleButton _sortFirstToLastButton {
263
+ icon-name: "view-sort-descending-symbolic";
264
+ tooltip-text: _("SortFirstLast");
265
+ active: bind _sortLastToFirstButton.active inverted bidirectional;
266
+ }
267
+
268
+ Gtk.ToggleButton _sortLastToFirstButton {
269
+ icon-name: "view-sort-ascending-symbolic";
270
+ tooltip-text: _("SortLastFirst");
271
+ }
272
+
273
+ styles ["linked"]
274
+ }
275
+ };
276
+ }
277
+ }
278
+
279
+ Gtk.ScrolledWindow _transactionsScroll {
280
+ width-request: 300;
281
+ height-request: 360;
282
+ min-content-height: 360;
283
+ vexpand: true;
284
+ visible: false;
285
+
286
+ Gtk.FlowBox _flowBox {
287
+ homogeneous: true;
288
+ column-spacing: 10;
289
+ row-spacing: 10;
290
+ margin-start: 10;
291
+ margin-end: 10;
292
+ margin-bottom: 60;
293
+ halign: fill;
294
+ valign: start;
295
+ selection-mode: none;
296
+ }
297
+ }
298
+
299
+ Adw.StatusPage _noTransactionsStatusPage {
300
+ icon-name: "money-none-symbolic";
301
+ vexpand: true;
302
+ width-request: 300;
303
+ height-request: 360;
304
+ margin-bottom: 60;
305
+ visible: false;
306
+ }
307
+ }
308
+
309
+ [overlay]
310
+ Gtk.Button {
311
+ tooltip-text: _("NewTransaction.Tooltip");
312
+ action-name: "account.newTransaction";
313
+ halign: center;
314
+ valign: end;
315
+ margin-bottom: 10;
316
+
317
+ Adw.ButtonContent {
318
+ icon-name: "list-add-symbolic";
319
+ label: _("New");
320
+ }
321
+
322
+ styles ["pill", "suggested-action"]
323
+ }
324
+ }
325
+
326
+ [overlay]
327
+ Adw.Bin _spinnerBin {
328
+ hexpand: true;
329
+ vexpand: true;
330
+
331
+ Gtk.Spinner _spinner {
332
+ width-request: 48;
333
+ height-request: 48;
334
+ halign: center;
335
+ valign: center;
336
+ hexpand: true;
337
+ vexpand: true;
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
0 commit comments