Skip to content

Commit 528b715

Browse files
authored
List View: Remove unused Stack and StackPage (#219)
1 parent 6b86bd9 commit 528b715

File tree

1 file changed

+28
-38
lines changed

1 file changed

+28
-38
lines changed

src/List View/main.blp

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,6 @@ Adw.StatusPage {
1313
orientation: vertical;
1414
spacing: 18;
1515

16-
Box {
17-
halign: center;
18-
19-
LinkButton {
20-
label: _("API Reference");
21-
uri: "https://docs.gtk.org/gtk4/class.ListView.html";
22-
}
23-
24-
LinkButton {
25-
label: _("Documentation");
26-
uri: "https://docs.gtk.org/gtk4/section-list-widget.html";
27-
}
28-
}
29-
3016
Box {
3117
halign: center;
3218

@@ -45,37 +31,41 @@ Adw.StatusPage {
4531
}
4632
}
4733

48-
Gtk.Stack stack {
49-
transition-type: crossfade;
50-
vexpand: true;
51-
52-
Gtk.StackPage {
53-
name: "listview";
54-
title: _("List View");
34+
ScrolledWindow {
35+
hscrollbar-policy: never;
36+
propagate-natural-height: true;
37+
has-frame: true;
38+
valign: start;
5539

56-
child: ScrolledWindow {
57-
hscrollbar-policy: never;
58-
propagate-natural-height: true;
59-
has-frame: true;
60-
valign: start;
61-
62-
ListView list_view {
63-
factory: BuilderListItemFactory {
64-
template ListItem {
65-
child: Gtk.Box {
66-
Gtk.Label {
67-
label: bind template.item as <StringObject>.string;
68-
height-request: 50;
69-
margin-start: 12;
70-
margin-end: 12;
71-
}
72-
};
40+
ListView list_view {
41+
factory: BuilderListItemFactory {
42+
template ListItem {
43+
child: Gtk.Box {
44+
Gtk.Label {
45+
label: bind template.item as <StringObject>.string;
46+
height-request: 50;
47+
margin-start: 12;
48+
margin-end: 12;
7349
}
7450
};
7551
}
7652
};
7753
}
7854
}
55+
56+
Box {
57+
halign: center;
58+
59+
LinkButton {
60+
label: _("API Reference");
61+
uri: "https://docs.gtk.org/gtk4/class.ListView.html";
62+
}
63+
64+
LinkButton {
65+
label: _("Documentation");
66+
uri: "https://docs.gtk.org/gtk4/section-list-widget.html";
67+
}
68+
}
7969
}
8070
}
8171
}

0 commit comments

Comments
 (0)