ags: better separator properties, add more separators on widgets

This commit is contained in:
retrozinndev
2025-04-27 08:19:26 -03:00
parent 4a2733d884
commit a0cf72ae8a
10 changed files with 100 additions and 91 deletions
@@ -35,11 +35,13 @@ export const BluetoothPage: (() => Page) = () => new Page({
} as Widget.ButtonProps)
],
onClose: () => stopBluetoothDevicesWatch(),
spacing: 2,
children: [
new Widget.Box({
className: "adapters",
visible: bind(AstalBluetooth.get_default(), "adapters").as((adapters) =>
adapters.length > 1),
spacing: 2,
children: bind(AstalBluetooth.get_default(), "adapters").as((adapters) => [
new Widget.Label({
className: "sub-header",
@@ -59,6 +61,7 @@ export const BluetoothPage: (() => Page) = () => new Page({
className: "connections",
orientation: Gtk.Orientation.VERTICAL,
hexpand: true,
spacing: 2,
children: [
new Widget.Box({
className: "paired",
+2
View File
@@ -11,6 +11,7 @@ export type PageProps = {
description?: string | Binding<string>;
headerButtons?: Array<Gtk.Button> | Binding<Array<Gtk.Button>>;
orientation?: Gtk.Orientation | Binding<Gtk.Orientation>;
spacing?: number;
child?: Gtk.Widget | Binding<Gtk.Widget>;
children?: Array<Gtk.Widget> | Binding<Array<Gtk.Widget>>;
};
@@ -76,6 +77,7 @@ class Page extends Widget.Box {
} as Widget.BoxProps),
new Widget.Box({
className: "content",
spacing: props.spacing ?? 4,
orientation: props.orientation ?? Gtk.Orientation.VERTICAL,
expand: true,
setup: props.setup,