Initial Adwaita widget wrappers

This commit is contained in:
Brendan Szymanski 2026-07-24 02:20:00 -04:00
parent 4594728770
commit 4c7054e31f

View file

@ -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)
}
}