mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Adapt PreferencesView to embed in iOS SettingsView form
This commit is contained in:
parent
4b914891b7
commit
4d4e4be162
@ -4,6 +4,14 @@ 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)
|
||||
@ -13,6 +21,7 @@ struct PreferencesView: View {
|
||||
.frame(width: 200, height: 100, alignment: .topLeading)
|
||||
.pickerStyle(RadioGroupPickerStyle())
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user