Skip to content

Commit 21ef10e

Browse files
committed
AppListUpdateView: Use Clamp to 800
1 parent 1e8d273 commit 21ef10e

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

src/Views/AppListUpdateView.vala

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public class AppCenter.Views.AppListUpdateView : Adw.NavigationPage {
1616
private Gtk.Revealer updated_revealer;
1717
private Gtk.Label updated_label;
1818
private Gtk.SizeGroup action_button_group;
19-
private Granite.HeaderLabel installed_header;
2019

2120
private uint updated_label_timeout_id = 0;
2221

@@ -83,19 +82,26 @@ public class AppCenter.Views.AppListUpdateView : Adw.NavigationPage {
8382
"has-updatable-packages", header_revealer, "reveal-child", SYNC_CREATE
8483
);
8584

85+
var updatable_header = new Granite.HeaderLabel (_("Available Updates")) {
86+
margin_end = 12,
87+
margin_start = 12
88+
};
89+
8690
list_box = new Gtk.ListBox () {
8791
activate_on_single_click = true,
8892
hexpand = true,
8993
};
9094
list_box.bind_model (flatpak_backend.updatable_packages, create_row_from_package);
9195

92-
installed_header = new Granite.HeaderLabel (_("Up to Date")) {
93-
margin_top = 12,
96+
var updatable_section = new Granite.Box (VERTICAL, HALF);
97+
updatable_section.append (updatable_header);
98+
updatable_section.append (list_box);
99+
flatpak_backend.bind_property ("has-updatable-packages", updatable_section, "visible", SYNC_CREATE);
100+
101+
var installed_header = new Granite.HeaderLabel (_("Up to Date")) {
94102
margin_end = 12,
95-
margin_bottom = 12,
96103
margin_start = 12
97104
};
98-
flatpak_backend.bind_property ("has-updated-packages", installed_header, "visible", SYNC_CREATE);
99105

100106
var installed_sort_model = new Gtk.SortListModel (
101107
flatpak_backend.updated_packages,
@@ -109,13 +115,22 @@ public class AppCenter.Views.AppListUpdateView : Adw.NavigationPage {
109115
};
110116
installed_flowbox.bind_model (installed_sort_model, create_installed_from_package);
111117

112-
var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
113-
box.append (list_box);
114-
box.append (installed_header);
115-
box.append (installed_flowbox);
118+
var installed_section = new Granite.Box (VERTICAL, HALF);
119+
installed_section.append (installed_header);
120+
installed_section.append (installed_flowbox);
121+
flatpak_backend.bind_property ("has-updated-packages", installed_section, "visible", SYNC_CREATE);
116122

117-
var scrolled = new Gtk.ScrolledWindow () {
123+
var box = new Granite.Box (VERTICAL, SINGLE);
124+
box.append (updatable_section);
125+
box.append (installed_section);
126+
127+
var clamp = new Adw.Clamp () {
118128
child = box,
129+
maximum_size = AppInfoView.MAX_WIDTH,
130+
};
131+
132+
var scrolled = new Gtk.ScrolledWindow () {
133+
child = clamp,
119134
hscrollbar_policy = Gtk.PolicyType.NEVER
120135
};
121136

0 commit comments

Comments
 (0)