Page MenuHomeMusing Studio

No OneTemporary

diff --git a/Shared/Preferences/PreferencesView.swift b/Shared/Preferences/PreferencesView.swift
index 4ee04f6..5af0a5e 100644
--- a/Shared/Preferences/PreferencesView.swift
+++ b/Shared/Preferences/PreferencesView.swift
@@ -1,23 +1,32 @@
import SwiftUI
struct PreferencesView: View {
@State private var appearance: Int = 0
var body: some View {
+ #if os(iOS)
+ Picker(selection: $appearance, label: Text("Appearance")) {
+ Text("System").tag(0)
+ Text("Light Mode").tag(1)
+ Text("Dark Mode").tag(2)
+ }
+ .pickerStyle(SegmentedPickerStyle())
+ #elseif os(macOS)
Form {
Picker(selection: $appearance, label: Text("Appearance")) {
Text("System").tag(0)
Text("Light Mode").tag(1)
Text("Dark Mode").tag(2)
}
.frame(width: 200, height: 100, alignment: .topLeading)
.pickerStyle(RadioGroupPickerStyle())
}
+ #endif
}
}
struct SwiftUIView_Previews: PreviewProvider {
static var previews: some View {
PreferencesView()
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, May 16, 12:03 PM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3240117

Event Timeline