3 struct OutputSettings: View {
5 @AppStorage("outputFormats") var outputFormats: OutputFormatSetting = .all
6 @AppStorage("frameRate") var frameRate = 10.0
8 private var anyState: String { "\(outputFormats), \(frameRate)" }
12 VStack (alignment: .center) {
13 LabeledContent("GIF Framerate") {
14 Slider(value: $frameRate, in: 4...10, step: 1) {
15 Text("\(Int(frameRate))").font(.body).frame(width: 24)
16 } minimumValueLabel: {
18 } maximumValueLabel: {
22 Picker(selection: $outputFormats, label: Text("Output Formats").font(.headline)) {
24 .tag(OutputFormatSetting.all)
25 .padding(.horizontal, 4.0)
26 .padding(.vertical, 2.0)
28 .tag(OutputFormatSetting.gifOnly)
29 .padding(.horizontal, 4.0)
30 .padding(.vertical, 2.0)
33 .tag(OutputFormatSetting.mp4Only)
34 .padding(.horizontal, 4.0)
35 .padding(.vertical, 2.0)
36 }.pickerStyle(.radioGroup)
40 .onChange(of: anyState) { _ in
41 NotificationCenter.default.post(name: .reloadConfiguration, object: nil, userInfo: nil)