39 lines
826 B
Swift
39 lines
826 B
Swift
//
|
|
// 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) {
|
|
Text("System").tag(Appearance.unspecified)
|
|
Text("Dark").tag(Appearance.dark)
|
|
Text("Light").tag(Appearance.light)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct PrefsView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
PrefsView()
|
|
}
|
|
}
|