From 637dfaddb58f554071db50086378d5873a873d0c Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sun, 1 Jun 2025 15:50:07 -0300 Subject: [PATCH] :sparkles: feat(control-center/page): add natural height scrollable for Page content to avoid issues on smaller screens --- ags/widget/control-center/pages/Page.ts | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ags/widget/control-center/pages/Page.ts b/ags/widget/control-center/pages/Page.ts index 74a5573..9a8ffa0 100644 --- a/ags/widget/control-center/pages/Page.ts +++ b/ags/widget/control-center/pages/Page.ts @@ -88,15 +88,20 @@ class Page extends Widget.Box { } as Widget.LabelProps), ] } as Widget.BoxProps), - new Widget.Box({ - className: "content", - spacing: props.spacing ?? 4, - orientation: props.orientation ?? Gtk.Orientation.VERTICAL, - expand: true, - setup: props.setup, - child: props.child, - children: props.children - } as Widget.BoxProps), + new Widget.Scrollable({ + hscroll: Gtk.PolicyType.NEVER, + vscroll: Gtk.PolicyType.AUTOMATIC, + propagateNaturalHeight: true, + child: new Widget.Box({ + className: "content", + spacing: props.spacing ?? 4, + orientation: props.orientation ?? Gtk.Orientation.VERTICAL, + expand: true, + setup: props.setup, + child: props.child, + children: props.children + } as Widget.BoxProps), + } as Widget.ScrollableProps), Separator({ alpha: .2, spacing: 6,