mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
New playback settings sheet
This commit is contained in:
@@ -67,6 +67,9 @@ struct AdvancedSettings: View {
|
||||
Text("cache-secs")
|
||||
.frame(minWidth: 140, alignment: .leading)
|
||||
TextField("cache-secs", text: $mpvCacheSecs)
|
||||
#if !os(macOS)
|
||||
.keyboardType(.URL)
|
||||
#endif
|
||||
}
|
||||
.multilineTextAlignment(.trailing)
|
||||
|
||||
@@ -74,6 +77,9 @@ struct AdvancedSettings: View {
|
||||
Text("cache-pause-wait")
|
||||
.frame(minWidth: 140, alignment: .leading)
|
||||
TextField("cache-pause-wait", text: $mpvCachePauseWait)
|
||||
#if !os(macOS)
|
||||
.keyboardType(.URL)
|
||||
#endif
|
||||
}
|
||||
.multilineTextAlignment(.trailing)
|
||||
|
||||
|
@@ -45,10 +45,6 @@ struct PlayerControlsSettings: View {
|
||||
List {
|
||||
sections
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.backport
|
||||
.scrollDismissesKeyboard()
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#if os(tvOS)
|
||||
@@ -215,23 +211,23 @@ struct PlayerControlsSettings: View {
|
||||
|
||||
HStack {
|
||||
#if !os(tvOS)
|
||||
Button {
|
||||
var intValue = Int(value.wrappedValue) ?? 10
|
||||
intValue += 5
|
||||
if intValue <= 0 {
|
||||
intValue = 5
|
||||
Label("Plus", systemImage: "plus")
|
||||
.imageScale(.large)
|
||||
.labelStyle(.iconOnly)
|
||||
.padding(7)
|
||||
.foregroundColor(.accentColor)
|
||||
#if os(iOS)
|
||||
.background(RoundedRectangle(cornerRadius: 4).strokeBorder(lineWidth: 1).foregroundColor(.accentColor))
|
||||
#endif
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
var intValue = Int(value.wrappedValue) ?? 10
|
||||
intValue += 5
|
||||
if intValue <= 0 {
|
||||
intValue = 5
|
||||
}
|
||||
value.wrappedValue = String(intValue)
|
||||
}
|
||||
value.wrappedValue = String(intValue)
|
||||
} label: {
|
||||
Label("Plus", systemImage: "plus")
|
||||
.imageScale(.large)
|
||||
.padding(7)
|
||||
.labelStyle(.iconOnly)
|
||||
.frame(minHeight: 35)
|
||||
.foregroundColor(.primary)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.background(RoundedRectangle(cornerRadius: 4).stroke(lineWidth: 1))
|
||||
#endif
|
||||
|
||||
#if os(tvOS)
|
||||
@@ -250,24 +246,24 @@ struct PlayerControlsSettings: View {
|
||||
#endif
|
||||
|
||||
#if !os(tvOS)
|
||||
Button {
|
||||
var intValue = Int(value.wrappedValue) ?? 10
|
||||
intValue -= 5
|
||||
if intValue <= 0 {
|
||||
intValue = 5
|
||||
Label("Minus", systemImage: "minus")
|
||||
.imageScale(.large)
|
||||
.labelStyle(.iconOnly)
|
||||
.padding(7)
|
||||
.foregroundColor(.accentColor)
|
||||
#if os(iOS)
|
||||
.frame(minHeight: 35)
|
||||
.background(RoundedRectangle(cornerRadius: 4).strokeBorder(lineWidth: 1).foregroundColor(.accentColor))
|
||||
#endif
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
var intValue = Int(value.wrappedValue) ?? 10
|
||||
intValue -= 5
|
||||
if intValue <= 0 {
|
||||
intValue = 5
|
||||
}
|
||||
value.wrappedValue = String(intValue)
|
||||
}
|
||||
value.wrappedValue = String(intValue)
|
||||
} label: {
|
||||
Label("Minus", systemImage: "minus")
|
||||
.imageScale(.large)
|
||||
.padding(7)
|
||||
.labelStyle(.iconOnly)
|
||||
.frame(minHeight: 35)
|
||||
.foregroundColor(.primary)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.background(RoundedRectangle(cornerRadius: 4).stroke(lineWidth: 1))
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -243,7 +243,7 @@ struct SettingsView: View {
|
||||
case .player:
|
||||
return 450
|
||||
case .controls:
|
||||
return 800
|
||||
return 850
|
||||
case .quality:
|
||||
return 420
|
||||
case .history:
|
||||
|
Reference in New Issue
Block a user