-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathexm-detail-view.blp
More file actions
336 lines (267 loc) · 7.85 KB
/
exm-detail-view.blp
File metadata and controls
336 lines (267 loc) · 7.85 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
using Gtk 4.0;
using Adw 1;
template $ExmDetailView : Adw.NavigationPage {
title: bind template.data as <$ExmUnifiedData>.name;
Adw.ToolbarView {
[top]
Adw.HeaderBar header_bar {
title-widget: Adw.WindowTitle title {
title: bind template.data as <$ExmUnifiedData>.name;
subtitle: bind template.data as <$ExmUnifiedData>.uuid;
};
}
content: Adw.BreakpointBin {
width-request: 360;
height-request: 294;
Adw.Breakpoint {
condition ("max-width: 400sp")
setters {
ext_info_bar.orientation: vertical;
header_suffix.orientation: vertical;
header_suffix.spacing: 12;
ext_install.halign: start;
}
apply => $breakpoint_apply_cb() swapped;
unapply => $breakpoint_unapply_cb() swapped;
}
Gtk.Stack stack {
vexpand: true;
Gtk.StackPage {
name: "page_spinner";
child: Gtk.Box {
orientation: vertical;
spacing: 24;
valign: center;
Gtk.Spinner {
spinning: true;
height-request: 32;
width-request: 32;
}
Gtk.Label {
styles["title-1"]
label: _("Loading Details");
}
};
}
Gtk.StackPage {
name: "page_error";
child: Adw.StatusPage {
title: _("An Error Occurred");
icon-name: "dialog-question-symbolic";
};
}
Gtk.StackPage {
name: "page_detail";
child: Gtk.ScrolledWindow scroll_area {
Adw.Clamp {
maximum-size: 800;
Gtk.Box {
styles ["detail"]
orientation: vertical;
spacing: 24;
Gtk.Box header {
orientation: horizontal;
spacing: 24;
Gtk.Image ext_icon {
halign: center;
valign: center;
pixel-size: 64;
}
Gtk.Box header_suffix {
orientation: horizontal;
spacing: 24;
Gtk.Box {
orientation: vertical;
hexpand: true;
valign: center;
Gtk.Label ext_title {
styles ["title-1"]
xalign: 0;
ellipsize: end;
label: bind template.data as <$ExmUnifiedData>.name;
}
Gtk.Label ext_author {
styles ["dim-label"]
xalign: 0;
ellipsize: end;
label: bind template.data as <$ExmUnifiedData>.creator;
}
}
Gtk.Stack tools_stack {
Gtk.StackPage {
name: "uninstalled-tools-page";
child: $ExmInstallButton ext_install {
valign: center;
halign: center;
};
}
Gtk.StackPage {
name: "installed-tools-page";
child: Gtk.Box {
spacing: 16;
Gtk.Box {
styles ["linked"]
Gtk.Button delete_btn {
styles ["destructive-action"]
icon-name: "user-trash-symbolic";
valign: center;
halign: center;
action-name: 'page.remove';
tooltip-text: _("Remove the extension");
}
Gtk.Button prefs_btn {
icon-name: "settings-symbolic";
valign: center;
halign: center;
action-name: 'page.open-prefs';
tooltip-text: _("Open extension preferences");
}
}
Gtk.Switch ext_toggle {
valign: center;
active: bind template.extension as <$ExmExtension>.enabled;
sensitive: bind template.extension as <$ExmExtension>.can-change;
state-set => $on_state_changed();
}
};
}
}
}
}
Gtk.Overlay ext_screenshot_container {
[overlay]
Gtk.Button ext_screenshot_popout_button {
styles ["osd", "circular"]
icon-name: "pip-out-symbolic";
halign: end;
valign: end;
margin-top: 8;
margin-bottom: 8;
margin-start: 8;
margin-end: 8;
tooltip-text: _("Enlarge image");
clicked => $screenshot_view_cb(template);
}
$ExmScreenshot ext_screenshot {}
}
Gtk.Box {
orientation: vertical;
Gtk.Label {
styles ["title-4", "detail-heading"]
label: _("Description");
xalign: 0;
}
Gtk.Label ext_description {
styles ["multiline"]
xalign: 0;
wrap: true;
wrap-mode: word_char;
selectable: true;
label: bind template.data as <$ExmUnifiedData>.description;
}
}
$ExmInfoBar ext_info_bar {}
Gtk.Box {
orientation: vertical;
Gtk.Label {
styles ["title-4", "detail-heading"]
label: _("Links");
xalign: 0;
}
Gtk.ListBox {
styles ["boxed-list"]
selection-mode: none;
Adw.ActionRow link_homepage {
[prefix]
Gtk.Image {
icon-name: "go-home-symbolic";
}
title: _("Homepage");
activatable: true;
action-name: "detail.open-homepage";
// subtitle: bind template.data as <$ExmUnifiedData>.homepage;
[suffix]
Gtk.Image {
styles ["dim-label"]
icon-name: "external-link-symbolic";
}
}
Adw.ActionRow link_extensions {
[prefix]
Gtk.Image {
icon-name: "web-browser-symbolic";
}
title: _("View on Extensions");
activatable: true;
action-name: "detail.open-extensions";
// subtitle: bind template.data as <$ExmUnifiedData>.link;
[suffix]
Gtk.Image {
styles ["dim-label"]
icon-name: "external-link-symbolic";
}
}
}
}
Gtk.Box {
orientation: vertical;
Gtk.Label {
styles ["title-4", "detail-heading"]
label: _("User Reviews");
xalign: 0;
}
// TODO: Abstract into common class
Gtk.Stack comment_stack {
vexpand: true;
Gtk.StackPage {
name: "page_spinner";
child: Gtk.Image {
icon-name: "content-loading-symbolic";
icon-size: large;
valign: center;
};
}
Gtk.StackPage {
name: "page_error";
child: Adw.StatusPage {
title: _("An Error Occurred");
icon-name: "dialog-question-symbolic";
};
}
Gtk.StackPage {
name: "page_empty";
child: Gtk.Label {
label: _("There are no comments.");
valign: start;
xalign: 0;
};
}
Gtk.StackPage {
name: "page_comments";
child: Gtk.Box {
orientation: vertical;
Gtk.FlowBox comment_box {
max-children-per-line: 2;
homogeneous: true;
selection-mode: none;
row-spacing: 12;
column-spacing: 12;
}
Gtk.Button show_more_btn {
label: _("_Show All Reviews");
halign: center;
margin-top: 10;
use-underline: true;
}
};
}
}
}
}
}
};
}
}
};
}
}