Minor fixes

This commit is contained in:
世界
2026-01-03 00:55:17 +08:00
parent 52db9bbb39
commit 64e2ece819
7 changed files with 65 additions and 27 deletions
@@ -47,20 +47,56 @@ public struct QRSDisplayView: View {
HStack {
Text(String(localized: "FPS"))
Spacer()
#if os(tvOS)
Button {
fps = max(1, fps - 1)
} label: {
Image(systemName: "minus")
}
Text(verbatim: "\(Int(fps))")
.foregroundStyle(.secondary)
.frame(minWidth: 50)
Button {
fps = min(60, fps + 1)
} label: {
Image(systemName: "plus")
}
#else
Text(verbatim: "\(Int(fps))")
.foregroundStyle(.secondary)
#endif
}
#if !os(tvOS)
Slider(value: $fps, in: 1 ... 60, step: 1)
#endif
HStack {
Text(String(localized: "Slice Size"))
Spacer()
#if os(tvOS)
Button {
sliceSize = max(100, sliceSize - 100)
} label: {
Image(systemName: "minus")
}
Text("\(Int(sliceSize))")
.foregroundStyle(.secondary)
.frame(minWidth: 50)
Button {
sliceSize = min(1500, sliceSize + 100)
} label: {
Image(systemName: "plus")
}
#else
Text("\(Int(sliceSize))")
.foregroundStyle(.secondary)
#endif
}
#if !os(tvOS)
Slider(value: $sliceSize, in: 100 ... 1500, step: 100)
#endif
}
.padding(.horizontal)