Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions src/Library/demos/Center Box/main.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Gtk 4.0;
using Adw 1;

Adw.StatusPage {
title: _("Center Box");
description: _("Displays three child widgets, while keeping the middle centered");

child: Box {
spacing: 24;
orientation: vertical;

Adw.Clamp {
maximum-size: bind width_adjustment.value;
child: CenterBox {
shrink-center-last: true;

[start]
Switch {
valign: center;
}

[center]
Entry {}

[end]
CheckButton {}
};
}

Scale width_scale {
orientation: horizontal;
halign: center;
width-request: 120;
adjustment: Adjustment width_adjustment {
lower: 200;
upper: 500;
value: 325;
};
}

LinkButton {
label: "API Reference";
uri: "https://docs.gtk.org/gtk4/class.CenterBox.html";
}
};
}
6 changes: 6 additions & 0 deletions src/Library/demos/Center Box/main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"category": "layout",
"description": "Displays three child widgets, while keeping the middle centered",
"panels": ["ui", "preview"],
"autorun": true
}