1
+ using Gtk 4.0;
2
+ using Adw 1;
3
+
4
+ Adw.MessageDialog _root {
5
+ default-width: 420;
6
+ hide-on-close: true;
7
+ modal: true;
8
+
9
+ Gtk.Box {
10
+ orientation: vertical;
11
+ spacing: 10;
12
+
13
+ Adw.PreferencesGroup {
14
+ Adw.EntryRow _descriptionRow {
15
+ title: _("Description.Field");
16
+ input-hints: spellcheck;
17
+ activates-default: true;
18
+ }
19
+
20
+ Adw.EntryRow _amountRow {
21
+ title: _("Amount.Field");
22
+ input-purpose: number;
23
+ activates-default: true;
24
+
25
+ [suffix]
26
+ Gtk.Label _currencyLabel {
27
+ styles ["dim-label"]
28
+ }
29
+ }
30
+
31
+ Adw.ActionRow {
32
+ title: _("TransactionType.Field");
33
+
34
+
35
+ [suffix]
36
+ Gtk.Box {
37
+ orientation: horizontal;
38
+ valign: center;
39
+
40
+ Gtk.ToggleButton _incomeButton {
41
+ label: _("Income");
42
+ active: bind _expenseButton.active inverted bidirectional;
43
+ }
44
+
45
+ Gtk.ToggleButton _expenseButton {
46
+ label: _("Expense");
47
+ }
48
+
49
+ styles ["linked"]
50
+ }
51
+ }
52
+ }
53
+
54
+ Adw.PreferencesGroup {
55
+ Adw.ActionRow {
56
+ title: _("Date.Field");
57
+ activatable-widget: _dateCalendarButton;
58
+
59
+ [suffix]
60
+ Gtk.MenuButton _dateCalendarButton {
61
+ valign: center;
62
+ popover: Gtk.Popover {
63
+ Gtk.Calendar _dateCalendar {
64
+ name: "calendarTransactions";
65
+ }
66
+ };
67
+
68
+ styles ["flat"]
69
+ }
70
+ }
71
+
72
+ Adw.ComboRow _repeatIntervalRow {
73
+ title: _("TransactionRepeatInterval.Field");
74
+ model: Gtk.StringList {
75
+ strings [_("RepeatInterval.Never"), _("RepeatInterval.Daily"), _("RepeatInterval.Weekly"), _("RepeatInterval.Biweekly"), _("RepeatInterval.Monthly"), _("RepeatInterval.Quarterly"), _("RepeatInterval.Yearly"), _("RepeatInterval.Biyearly")]
76
+ };
77
+ }
78
+
79
+ Adw.ActionRow _repeatEndDateRow {
80
+ title: _("TransactionRepeatEndDate.Field");
81
+ activatable-widget: _repeatEndDateCalendarButton;
82
+
83
+ [suffix]
84
+ Gtk.MenuButton _repeatEndDateCalendarButton {
85
+ valign: center;
86
+ popover: Gtk.Popover {
87
+ Gtk.Calendar _repeatEndDateCalendar {
88
+ name: "calendarTransactions";
89
+ }
90
+ };
91
+
92
+ styles ["flat"]
93
+ }
94
+
95
+ [suffix]
96
+ Gtk.Button _repeatEndDateClearButton {
97
+ valign: center;
98
+ icon-name: "window-close-symbolic";
99
+ tooltip-text: _("TransactionRepeatEndDate.Clear");
100
+
101
+ styles ["flat"]
102
+ }
103
+ }
104
+ }
105
+
106
+ Adw.PreferencesGroup {
107
+ Adw.ComboRow _groupRow {
108
+ title: _("Group.Field");
109
+ }
110
+
111
+ Adw.ActionRow {
112
+ title: _("Color.Field");
113
+ activatable-widget: _colorButton;
114
+
115
+ [suffix]
116
+ Gtk.ColorButton _colorButton {
117
+ valign: center;
118
+ }
119
+ }
120
+ }
121
+
122
+ Adw.PreferencesGroup {
123
+ Adw.ActionRow {
124
+ title: _("Receipt.Field");
125
+
126
+ [suffix]
127
+ Gtk.Box {
128
+ orientation: horizontal;
129
+ spacing: 6;
130
+
131
+ Gtk.Button _viewReceiptButton {
132
+ valign: center;
133
+ tooltip-text: _("View");
134
+
135
+ Adw.ButtonContent _viewReceiptButtonContent {
136
+ icon-name: "image-x-generic-symbolic";
137
+ }
138
+
139
+ styles ["flat"]
140
+ }
141
+
142
+ Gtk.Button _deleteReceiptButton {
143
+ valign: center;
144
+ tooltip-text: _("Delete");
145
+
146
+ Adw.ButtonContent {
147
+ icon-name: "user-trash-symbolic";
148
+ }
149
+
150
+ styles ["flat"]
151
+ }
152
+
153
+ Gtk.Button _uploadReceiptButton {
154
+ valign: center;
155
+ tooltip-text: _("Upload");
156
+
157
+ Adw.ButtonContent _uploadReceiptButtonContent {
158
+ icon-name: "document-send-symbolic";
159
+ }
160
+
161
+ styles ["flat"]
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
0 commit comments