Skip to content
Open
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
2 changes: 2 additions & 0 deletions Sources/Showcase/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ enum ContentTab: String, Hashable {
struct ContentView: View {
@AppStorage("tab") var tab = ContentTab.about
@AppStorage("appearance") var appearance = ""
@AppStorage("statusBarHidden") var statusBarHidden = false

var body: some View {
TabView(selection: $tab) {
Expand All @@ -32,6 +33,7 @@ struct ContentView: View {
}
}
.preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil)
.statusBarHidden(statusBarHidden)
}
}

Expand Down
2 changes: 2 additions & 0 deletions Sources/Showcase/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import SkipMarketplace

struct SettingsView: View {
@Binding var appearance: String
@AppStorage("statusBarHidden") var statusBarHidden = false

var body: some View {
NavigationStack {
Expand All @@ -14,6 +15,7 @@ struct SettingsView: View {
Text("Light").tag("light")
Text("Dark").tag("dark")
}
Toggle("Hide status bar", isOn: $statusBarHidden)
NavigationLink("System Information") {
let env = ProcessInfo.processInfo.environment
List {
Expand Down
Loading