forked from bazaar-org/bazaar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbz-addon-tile.blp
More file actions
89 lines (79 loc) · 2.6 KB
/
bz-addon-tile.blp
File metadata and controls
89 lines (79 loc) · 2.6 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
using Gtk 4.0;
template $BzAddonTile: $BzListTile {
accessibility {
labelled-by: title_label;
described-by: description_label;
}
child: Box {
orientation: horizontal;
spacing: 10;
height-request: 64;
Box {
orientation: vertical;
valign: center;
spacing: 4;
margin-start: 10;
Label title_label {
xalign: 0.0;
ellipsize: end;
single-line-mode: true;
has-tooltip: true;
tooltip-text: bind template.group as <$BzEntryGroup>.id;
label: bind template.group as <$BzEntryGroup>.title;
}
Label description_label {
halign: start;
label: bind template.group as <$BzEntryGroup>.description;
visible: bind eol_label.visible inverted;
xalign: 0.0;
ellipsize: end;
single-line-mode: true;
styles ["dim-label", "caption"]
}
Label eol_label{
visible: bind $invert_boolean($is_null(template.group as <$BzEntryGroup>.eol) as <bool>) as <bool>;
wrap: true;
wrap-mode: word_char;
ellipsize: end;
vexpand: true;
lines: 2;
single-line-mode: true;
halign: start;
hexpand: true;
label: _("Stopped Receiving Updates");
styles [
"warning",
]
}
}
Box {
orientation: horizontal;
spacing: 8;
margin-end: 8;
hexpand: true;
halign: end;
Button install_remove_button {
styles ["flat"]
width-request: 32;
height-request: 32;
valign: center;
has-tooltip: true;
visible: bind $invert_boolean($logical_and($is_zero(template.group as <$BzEntryGroup>.removable) as <bool>, $is_zero(template.group as <$BzEntryGroup>.installable) as <bool>) as <bool>) as <bool>;
tooltip-text: bind $get_install_remove_tooltip(template.group as <$BzEntryGroup>.removable) as <string>;
sensitive: bind $switch_bool(
template.group as <$BzEntryGroup>.removable,
$invert_boolean($is_zero(template.group as <$BzEntryGroup>.removable-and-available) as <bool>) as <bool>,
$invert_boolean($is_zero(template.group as <$BzEntryGroup>.installable-and-available) as <bool>) as <bool>,
) as <bool>;
icon-name: bind $get_install_remove_icon(template.group as <$BzEntryGroup>.removable) as <string>;
clicked => $install_remove_cb() swapped;
}
Image {
pixel-size: 14;
icon-name: "go-next-symbolic";
margin-end: 4;
styles ["dimmed"]
}
}
};
}