]>
Commit | Line | Data |
---|---|---|
a4e80427 RBR |
1 | import SwiftUI |
2 | ||
3 | struct OutputSettings: View { | |
4 | ||
5 | @AppStorage("outputFormats") var outputFormats: OutputFormatSetting = .all | |
6 | @AppStorage("frameRate") var frameRate = 10.0 | |
7 | ||
8 | var body: some View { | |
9 | Form { | |
c9b9e1d6 | 10 | VStack (alignment: .center) { |
a4e80427 RBR |
11 | LabeledContent("GIF Framerate") { |
12 | Slider(value: $frameRate, in: 4...10, step: 1) { | |
13 | Text("\(Int(frameRate))").font(.body).frame(width: 24) | |
14 | } minimumValueLabel: { | |
15 | Text("4") | |
16 | } maximumValueLabel: { | |
c9b9e1d6 | 17 | Text("10") |
a4e80427 RBR |
18 | } |
19 | }.font(.headline) | |
20 | Picker(selection: $outputFormats, label: Text("Output Formats").font(.headline)) { | |
21 | Text("GIF & MP4") | |
22 | .tag(OutputFormatSetting.all) | |
23 | .padding(.horizontal, 4.0) | |
24 | .padding(.vertical, 2.0) | |
25 | Text("Only GIF") | |
26 | .tag(OutputFormatSetting.gifOnly) | |
27 | .padding(.horizontal, 4.0) | |
28 | .padding(.vertical, 2.0) | |
29 | ||
30 | Text("Only MP4") | |
31 | .tag(OutputFormatSetting.mp4Only) | |
32 | .padding(.horizontal, 4.0) | |
33 | .padding(.vertical, 2.0) | |
34 | }.pickerStyle(.radioGroup) | |
35 | } | |
c9b9e1d6 | 36 | Spacer() |
a4e80427 RBR |
37 | } |
38 | } | |
39 | } | |
40 | ||
41 | #Preview { | |
42 | OutputSettings() | |
43 | } |