Selaa lähdekoodia

wizard: fix layout for classic mac os on iOS

osy 2 viikkoa sitten
vanhempi
commit
cca99bff94

+ 10 - 12
Platform/Shared/VMWizardHardwareView.swift

@@ -136,19 +136,17 @@ struct VMWizardHardwareView: View {
                 }
 
             } else if wizardState.operatingSystem == .ClassicMacOS {
-                Section {
-                    Picker("Machine", selection: $classicMacSystem) {
-                        ForEach(ClassicMacSystem.allCases) { system in
-                            Text(system.title).tag(system)
-                        }
-                    }.pickerStyle(.inline)
-                    .onChange(of: classicMacSystem) { newValue in
-                        wizardState.systemArchitecture = newValue.architecture
-                        wizardState.systemTarget = newValue.target
-                        wizardState.systemMemoryMib = newValue.defaultRam
-                        wizardState.systemCpuCount = 1
-                        wizardState.storageSizeGib = 2
+                Picker("Machine", selection: $classicMacSystem) {
+                    ForEach(ClassicMacSystem.allCases) { system in
+                        Text(system.title).tag(system)
                     }
+                }.pickerStyle(.inline)
+                .onChange(of: classicMacSystem) { newValue in
+                    wizardState.systemArchitecture = newValue.architecture
+                    wizardState.systemTarget = newValue.target
+                    wizardState.systemMemoryMib = newValue.defaultRam
+                    wizardState.systemCpuCount = 1
+                    wizardState.storageSizeGib = 2
                 }
             }
             Section {

+ 4 - 1
Platform/Shared/VMWizardOSClassicMacView.swift

@@ -73,7 +73,10 @@ struct VMWizardOSClassicMacView: View {
                         ForEach(PpcVia.allCases) { item in
                             Text(item.title).tag(item)
                         }
-                    }.pickerStyle(.inline)
+                    }
+                    #if os(macOS)
+                    .pickerStyle(.inline)
+                    #endif
                     .help("Different versions of Mac OS require different VIA option.")
                     .onChange(of: ppcVia) { newValue in
                         wizardState.machineProperties = newValue.machineProperties