mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
parent
43c0509b93
commit
e06751d458
1 changed files with 42 additions and 0 deletions
|
|
@ -178,6 +178,10 @@ struct OnboardingCustomizeAppearanceView: View {
|
|||
@AppStorage("alwaysLandscape") private var isAlwaysLandscape = false
|
||||
|
||||
@AppStorage("externalPlayer") private var externalPlayer: String = "Sora"
|
||||
|
||||
@AppStorage("mediaColumnsPortrait") private var mediaColumnsPortrait: Int = 2
|
||||
@AppStorage("mediaColumnsLandscape") private var mediaColumnsLandscape: Int = 4
|
||||
|
||||
private let mediaPlayers = ["Default", "VLC", "OutPlayer", "Infuse", "nPlayer", "Sora"]
|
||||
|
||||
var body: some View {
|
||||
|
|
@ -218,6 +222,44 @@ struct OnboardingCustomizeAppearanceView: View {
|
|||
Toggle("Force Landscape", isOn: $isAlwaysLandscape)
|
||||
.tint(.accentColor)
|
||||
}
|
||||
|
||||
SettingsSection(title: "Grid Layout") {
|
||||
HStack {
|
||||
Text("Portrait Columns")
|
||||
Spacer()
|
||||
Picker("", selection: $mediaColumnsPortrait) {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
ForEach(1..<6) { i in
|
||||
Text("\(i)").tag(i)
|
||||
}
|
||||
} else {
|
||||
ForEach(1..<5) { i in
|
||||
Text("\(i)").tag(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
.pickerStyle(MenuPickerStyle())
|
||||
.labelsHidden()
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text("Landscape Columns")
|
||||
Spacer()
|
||||
Picker("", selection: $mediaColumnsLandscape) {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
ForEach(2..<9) { i in
|
||||
Text("\(i)").tag(i)
|
||||
}
|
||||
} else {
|
||||
ForEach(2..<6) { i in
|
||||
Text("\(i)").tag(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
.pickerStyle(MenuPickerStyle())
|
||||
.labelsHidden()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.background(
|
||||
|
|
|
|||
Loading…
Reference in a new issue