File tree Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ using Gtk 4.0;
2+ using Adw 1;
3+
4+ Adw.Bin {
5+ Adw.BottomSheet bottom_sheet {
6+ bottom-bar: Label {
7+ label: _("Bottom Bar");
8+ margin-bottom: 12;
9+ margin-end: 12;
10+ margin-start: 12;
11+ margin-top: 12;
12+ };
13+
14+ content: Adw.StatusPage {
15+ description: _("Display content with a bottom sheet");
16+ title: _("Bottom Sheet");
17+
18+ child: Box {
19+ orientation: vertical;
20+ spacing: 12;
21+ halign: center;
22+
23+ Adw.Clamp {
24+ child: Adw.PreferencesGroup {
25+ Adw.SwitchRow {
26+ active: bind bottom_sheet.full-width bidirectional;
27+ title: _("Full Width");
28+ }
29+
30+ Adw.SwitchRow {
31+ active: bind bottom_sheet.can-open bidirectional;
32+ title: _("Can Open");
33+ }
34+
35+ Adw.SwitchRow {
36+ active: bind bottom_sheet.open bidirectional;
37+ title: _("Open");
38+ }
39+ };
40+ }
41+
42+ LinkButton {
43+ label: _("API Reference");
44+ uri: "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.BottomSheet.html";
45+ }
46+ };
47+ };
48+
49+ sheet: Adw.StatusPage {
50+ width-request: 360;
51+ title: _("Sheet");
52+
53+ child: Adw.Clamp {
54+ child: Adw.PreferencesGroup {
55+ Adw.SwitchRow {
56+ active: bind bottom_sheet.can-close bidirectional;
57+ title: _("Can Close");
58+ }
59+
60+ Adw.SwitchRow {
61+ active: bind bottom_sheet.show-drag-handle bidirectional;
62+ title: _("Show Drag Handle");
63+ }
64+
65+ Adw.SwitchRow {
66+ active: bind bottom_sheet.modal bidirectional;
67+ title: _("Modal");
68+ }
69+ };
70+ };
71+ };
72+ }
73+ }
Original file line number Diff line number Diff line change 1+ {
2+ "category" : " layout" ,
3+ "description" : " Display content with a bottom sheet" ,
4+ "panels" : [" ui" , " preview" ],
5+ "autorun" : true
6+ }
You can’t perform that action at this time.
0 commit comments