Skip to content

Commit 88f7adf

Browse files
committed
New AboutWindow
1 parent ab19027 commit 88f7adf

2 files changed

Lines changed: 151 additions & 145 deletions

File tree

data/ui/mainwindow.blp

Lines changed: 147 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -12,192 +12,194 @@ template MondaiMainWindow : He.ApplicationWindow {
1212
height-request: 294;
1313
resizable: false;
1414

15-
Gtk.Box {
16-
orientation: vertical;
17-
18-
He.AppBar appbar {
19-
show-back: false;
20-
show-right-title-buttons: true;
21-
scroller: s;
22-
23-
[titlebar-menu]
24-
Gtk.MenuButton {
25-
icon-name: "open-menu-symbolic";
26-
menu-model: primary-menu;
15+
Gtk.Overlay about_overlay {
16+
child: Gtk.Box {
17+
orientation: vertical;
18+
19+
He.AppBar appbar {
20+
show-back: false;
21+
show-right-title-buttons: true;
22+
scroller: s;
23+
24+
[titlebar-menu]
25+
Gtk.MenuButton {
26+
icon-name: "open-menu-symbolic";
27+
menu-model: primary-menu;
28+
}
2729
}
28-
}
2930

30-
Gtk.Stack stack {
31-
vhomogeneous: true;
32-
vexpand: true;
33-
transition-type: slide_left_right;
31+
Gtk.Stack stack {
32+
vhomogeneous: true;
33+
vexpand: true;
34+
transition-type: slide_left_right;
3435

35-
Gtk.StackPage {
36-
name: "select";
36+
Gtk.StackPage {
37+
name: "select";
3738

38-
child: Gtk.Box {
39-
orientation: vertical;
40-
hexpand: true;
41-
vexpand: true;
42-
margin-bottom: 18;
43-
44-
Gtk.ScrolledWindow s {
39+
child: Gtk.Box {
40+
orientation: vertical;
41+
hexpand: true;
4542
vexpand: true;
46-
margin-start: 18;
47-
margin-end: 18;
43+
margin-bottom: 18;
4844

49-
Gtk.ListBox list_box {
45+
Gtk.ScrolledWindow s {
5046
vexpand: true;
51-
valign: start;
52-
selection-mode: single;
47+
margin-start: 18;
48+
margin-end: 18;
5349

54-
row-selected => on_listbox_row_selected();
50+
Gtk.ListBox list_box {
51+
vexpand: true;
52+
valign: start;
53+
selection-mode: single;
5554

56-
styles ["content-list"]
55+
row-selected => on_listbox_row_selected();
5756

58-
.MondaiProductItem {
59-
product: helium-shell;
60-
}
57+
styles ["content-list"]
6158

62-
.MondaiProductItem {
63-
product: fyra-accounts;
64-
}
59+
.MondaiProductItem {
60+
product: helium-shell;
61+
}
6562

66-
.MondaiProductItem {
67-
product: fermion;
68-
}
63+
.MondaiProductItem {
64+
product: fyra-accounts;
65+
}
6966

70-
.MondaiProductItem {
71-
product: abacus;
72-
}
67+
.MondaiProductItem {
68+
product: fermion;
69+
}
7370

74-
.MondaiProductItem {
75-
product: modi;
76-
}
71+
.MondaiProductItem {
72+
product: abacus;
73+
}
7774

78-
.MondaiProductItem {
79-
product: enigma;
80-
}
75+
.MondaiProductItem {
76+
product: modi;
77+
}
8178

82-
.MondaiProductItem {
83-
product: kairos;
84-
}
79+
.MondaiProductItem {
80+
product: enigma;
81+
}
8582

86-
.MondaiProductItem {
87-
product: buds;
88-
}
83+
.MondaiProductItem {
84+
product: kairos;
85+
}
8986

90-
.MondaiProductItem {
91-
product: victrola;
92-
}
87+
.MondaiProductItem {
88+
product: buds;
89+
}
9390

94-
.MondaiProductItem {
95-
product: nixie;
91+
.MondaiProductItem {
92+
product: victrola;
93+
}
94+
95+
.MondaiProductItem {
96+
product: nixie;
97+
}
9698
}
9799
}
98-
}
99-
100-
He.Divider {}
101100

102-
He.Button to_describe {
103-
label: "Next";
104-
is-pill: true;
105-
sensitive: false;
106-
margin-start: 18;
107-
margin-end: 18;
108-
}
109-
};
110-
}
101+
He.Divider {}
111102

112-
Gtk.StackPage {
113-
name: "describe";
103+
He.Button to_describe {
104+
label: "Next";
105+
is-pill: true;
106+
sensitive: false;
107+
margin-start: 18;
108+
margin-end: 18;
109+
}
110+
};
111+
}
114112

115-
child: Gtk.Box {
116-
hexpand: true;
117-
vexpand: true;
118-
orientation: vertical;
119-
margin-bottom: 18;
113+
Gtk.StackPage {
114+
name: "describe";
120115

121-
Gtk.ScrolledWindow s1 {
116+
child: Gtk.Box {
117+
hexpand: true;
122118
vexpand: true;
123-
margin-start: 18;
124-
margin-end: 18;
119+
orientation: vertical;
120+
margin-bottom: 18;
125121

126-
Gtk.Box {
127-
orientation: vertical;
128-
spacing: 6;
129-
hexpand: true;
122+
Gtk.ScrolledWindow s1 {
130123
vexpand: true;
124+
margin-start: 18;
125+
margin-end: 18;
131126

132-
Gtk.Label {
133-
label: _("Tell us the problem (Markdown supported)");
134-
halign: start;
135-
}
136-
137-
Gtk.TextView {
127+
Gtk.Box {
128+
orientation: vertical;
129+
spacing: 6;
130+
hexpand: true;
138131
vexpand: true;
139-
buffer: TextBuffer {
140-
changed => on_description_textbuffer_changed();
141-
};
142-
styles ["text-view"]
143-
}
144132

145-
Gtk.Label {
146-
label: _("What should happen? (Markdown supported)");
147-
halign: start;
133+
Gtk.Label {
134+
label: _("Tell us the problem (Markdown supported)");
135+
halign: start;
136+
}
137+
138+
Gtk.TextView {
139+
vexpand: true;
140+
buffer: TextBuffer {
141+
changed => on_description_textbuffer_changed();
142+
};
143+
styles ["text-view"]
144+
}
145+
146+
Gtk.Label {
147+
label: _("What should happen? (Markdown supported)");
148+
halign: start;
149+
}
150+
151+
Gtk.TextView {
152+
vexpand: true;
153+
buffer: TextBuffer {
154+
changed => on_expected_textbuffer_changed();
155+
};
156+
styles ["text-view"]
157+
}
158+
159+
Gtk.CheckButton {
160+
label: _("I agree that my report will be made public");
161+
toggled => on_checkbutton_toggled();
162+
}
148163
}
164+
}
149165

150-
Gtk.TextView {
151-
vexpand: true;
152-
buffer: TextBuffer {
153-
changed => on_expected_textbuffer_changed();
154-
};
155-
styles ["text-view"]
156-
}
166+
He.Divider {}
157167

158-
Gtk.CheckButton {
159-
label: _("I agree that my report will be made public");
160-
toggled => on_checkbutton_toggled();
161-
}
168+
He.Button submit {
169+
margin-start: 18;
170+
margin-end: 18;
171+
is-pill: true;
172+
label: "Submit";
173+
sensitive: false;
162174
}
163-
}
175+
};
176+
}
164177

165-
He.Divider {}
178+
Gtk.StackPage {
179+
name: "submitted";
166180

167-
He.Button submit {
181+
child: Gtk.Box {
182+
orientation: vertical;
183+
spacing: 10;
184+
hexpand: true;
185+
vexpand: true;
168186
margin-start: 18;
169187
margin-end: 18;
170-
is-pill: true;
171-
label: "Submit";
172-
sensitive: false;
173-
}
174-
};
175-
}
176188

177-
Gtk.StackPage {
178-
name: "submitted";
179-
180-
child: Gtk.Box {
181-
orientation: vertical;
182-
spacing: 10;
183-
hexpand: true;
184-
vexpand: true;
185-
margin-start: 18;
186-
margin-end: 18;
187-
188-
He.ViewTitle {
189-
label: _("Report Submitted");
190-
}
191-
192-
Gtk.ScrolledWindow s2 {
193-
Gtk.Label {
194-
label: _("Thank you for submitting your bug report. A Fyra Labs staff member will shortly review your report.");
195-
halign: start;
196-
wrap: true;
189+
He.ViewTitle {
190+
label: _("Report Submitted");
191+
}
192+
193+
Gtk.ScrolledWindow s2 {
194+
Gtk.Label {
195+
label: _("Thank you for submitting your bug report. A Fyra Labs staff member will shortly review your report.");
196+
halign: start;
197+
wrap: true;
198+
}
197199
}
198-
}
199-
};
200+
};
201+
}
200202
}
201-
}
203+
};
202204
}
203205
}

src/MainWindow.vala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public class Mondai.MainWindow : He.ApplicationWindow {
1414
private string expected = "";
1515
private bool agreed_tos = false;
1616

17+
[GtkChild]
18+
unowned Gtk.Overlay about_overlay;
19+
1720
[GtkChild]
1821
unowned He.AppBar appbar;
1922
[GtkChild]
@@ -58,6 +61,7 @@ public class Mondai.MainWindow : He.ApplicationWindow {
5861
He.AboutWindow.Licenses.GPLV3,
5962
He.Colors.DARK
6063
);
64+
about_overlay.add_overlay (about);
6165
about.present ();
6266
}
6367

0 commit comments

Comments
 (0)