-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
Adw.Bin { | ||
Adw.BottomSheet bottom_sheet { | ||
bottom-bar: Label { | ||
label: "Bottom Bar"; | ||
margin-bottom: 12; | ||
margin-end: 12; | ||
margin-start: 12; | ||
margin-top: 12; | ||
}; | ||
|
||
content: Adw.StatusPage { | ||
child: Box { | ||
orientation: vertical; | ||
spacing: 12; | ||
halign: center; | ||
LinkButton { | ||
label: _("API Reference"); | ||
uri: "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.BottomSheet.html"; | ||
} | ||
Adw.Clamp { | ||
child: Adw.PreferencesGroup { | ||
Adw.SwitchRow { | ||
active: bind bottom_sheet.full-width bidirectional; | ||
title: "Full Width"; | ||
} | ||
|
||
Adw.SwitchRow { | ||
active: bind bottom_sheet.can-open bidirectional; | ||
title: "Can Open"; | ||
} | ||
|
||
Adw.SwitchRow { | ||
active: bind bottom_sheet.open bidirectional; | ||
title: "Open"; | ||
} | ||
}; | ||
} | ||
}; | ||
|
||
description: "Display content with a bottom sheet"; | ||
title: "Bottom Sheet"; | ||
}; | ||
|
||
sheet: Adw.StatusPage { | ||
width-request: 360; | ||
|
||
child: Adw.Clamp { | ||
child: Adw.PreferencesGroup { | ||
Adw.SwitchRow { | ||
active: bind bottom_sheet.can-close bidirectional; | ||
title: "Can Close"; | ||
} | ||
|
||
Adw.SwitchRow { | ||
active: bind bottom_sheet.show-drag-handle bidirectional; | ||
title: "Show Drag Handle"; | ||
} | ||
|
||
Adw.SwitchRow { | ||
active: bind bottom_sheet.modal bidirectional; | ||
title: "Modal"; | ||
} | ||
}; | ||
}; | ||
|
||
title: "Sheet"; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"category": "layout", | ||
"description": "Display content with a bottom sheet", | ||
"panels": ["ui", "preview"], | ||
"autorun": true | ||
} |