Initial Adwaita widget wrappers
This commit is contained in:
parent
4594728770
commit
4c7054e31f
1 changed files with 31 additions and 2 deletions
|
|
@ -22,13 +22,42 @@ struct ListDemo: View {
|
|||
}
|
||||
}
|
||||
|
||||
// MARK: - Adw widget demo
|
||||
|
||||
struct AdwDemo: View {
|
||||
@State private var title = "Welcome to Portico!"
|
||||
@State private var description = "Making GTK apps is as simple as 1, 2, 3!"
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
HeaderBar()
|
||||
Clamp {
|
||||
StatusPage {
|
||||
PreferencesGroup {
|
||||
EntryRow()
|
||||
.title("Title")
|
||||
.text($title)
|
||||
EntryRow()
|
||||
.title("Description")
|
||||
.text($description)
|
||||
}
|
||||
.title("Welcome Options")
|
||||
}
|
||||
.title($title)
|
||||
.description($description)
|
||||
.iconName("person-symbolic")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@main
|
||||
struct ExampleApp: App {
|
||||
var applicationId: String? { "dev.bscubed.PorticoExample" }
|
||||
|
||||
var body: some Scene {
|
||||
Window { _ in ListDemo() }
|
||||
.title("Portico P4 — ForEach")
|
||||
Window { _ in AdwDemo() }
|
||||
.title("Portico Example")
|
||||
.defaultSize(width: 1280, height: 800)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue