2022-01-16 16:58:28 +00:00
|
|
|
//
|
|
|
|
// PrefsView.swift
|
|
|
|
// Reader
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 1/16/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct PrefsView: View {
|
|
|
|
@ObservedObject private var preferences = Preferences.shared
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
VStack {
|
|
|
|
GroupBox {
|
|
|
|
VStack {
|
|
|
|
appearance
|
|
|
|
}
|
|
|
|
.padding()
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
|
}
|
|
|
|
}.padding()
|
|
|
|
}
|
|
|
|
|
|
|
|
private var appearance: some View {
|
|
|
|
Picker("Appearance", selection: $preferences.appearance) {
|
2022-01-16 17:32:45 +00:00
|
|
|
Text("System").tag(Appearance.unspecified)
|
|
|
|
Text("Dark").tag(Appearance.dark)
|
|
|
|
Text("Light").tag(Appearance.light)
|
2022-01-16 16:58:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct PrefsView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
PrefsView()
|
|
|
|
}
|
|
|
|
}
|