Clamp the Apps page's connect row to the page body's width

The connect group sat outside the AdwClamp that caps the app list, so it
spanned the whole window while the list below was capped at 720 — 39px
wider at 600px and 216px wider at 900px. Wrap it in its own clamp with
the same maximum size; it stays above the scroll area, so the row is
still always visible.
This commit is contained in:
raucao committed 2026-11-25 15:13:06 +04:00
1 parent 47c41c5e4c
commit a064a9ef7c
1 file changed
+9 -1
+9 -1
View File
@@ -89,6 +89,14 @@ impl AppsView {
connect_group.set_margin_top(18);
connect_group.set_margin_start(12);
connect_group.set_margin_end(12);
// Clamp it like the page body. The row is above the stack, so it stays
// put in the empty state and a long app list cannot scroll it away —
// but without its own clamp it would span the whole window while the
// list below is capped at 720.
let connect_clamp = adw::Clamp::builder()
.child(&connect_group)
.maximum_size(720)
.build();
let body = gtk::Box::builder()
.orientation(gtk::Orientation::Vertical)
@@ -109,7 +117,7 @@ impl AppsView {
let outer = gtk::Box::builder()
.orientation(gtk::Orientation::Vertical)
.build();
outer.append(&connect_group);
outer.append(&connect_clamp);
outer.append(&stack);
let ui = Rc::new(Ui {