Browse Source

wizard: update os logos to free images

osy 2 weeks ago
parent
commit
b5723e9010

+ 12 - 0
Platform/Assets.xcassets/Logo-Linux.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "linux.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Platform/Assets.xcassets/Logo-Linux.imageset/linux.pdf


+ 12 - 0
Platform/Assets.xcassets/Logo-Windows.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "windows.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Platform/Assets.xcassets/Logo-Windows.imageset/windows.pdf


+ 12 - 0
Platform/Assets.xcassets/Logo-macOS.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "macos.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Platform/Assets.xcassets/Logo-macOS.imageset/macos.pdf


+ 6 - 15
Platform/Shared/VMWizardOSView.swift

@@ -29,7 +29,7 @@ struct VMWizardOSView: View {
                         wizardState.isGuestToolsInstallRequested = false
                         wizardState.next()
                     } label: {
-                        OperatingSystem(imageName: "mac", name: "macOS 12+")
+                        OperatingSystem(imageName: "Logo-macOS", name: "macOS 12+")
                     }
                 }
                 #endif
@@ -40,7 +40,7 @@ struct VMWizardOSView: View {
                         wizardState.isGuestToolsInstallRequested = false
                         wizardState.next()
                     } label: {
-                        OperatingSystem(imageName: "macos", name: "Classic Mac OS")
+                        OperatingSystem(imageName: "Logo-macOS", name: "Classic Mac OS")
                     }
                 }
                 Button {
@@ -49,18 +49,14 @@ struct VMWizardOSView: View {
                     wizardState.isGuestToolsInstallRequested = true
                     wizardState.next()
                 } label: {
-                    if wizardState.useVirtualization {
-                        OperatingSystem(imageName: "windows-11", name: "Windows")
-                    } else {
-                        OperatingSystem(imageName: "windows-9x", name: "Windows")
-                    }
+                    OperatingSystem(imageName: "Logo-Windows", name: "Windows")
                 }
                 Button {
                     wizardState.operatingSystem = .Linux
                     wizardState.isGuestToolsInstallRequested = false
                     wizardState.next()
                 } label: {
-                    OperatingSystem(imageName: "linux", name: "Linux")
+                    OperatingSystem(imageName: "Logo-Linux", name: "Linux")
                 }
             } header: {
                 Text("Preconfigured")
@@ -95,18 +91,13 @@ struct OperatingSystem: View {
     let imageName: String
     let name: LocalizedStringKey
     
-    private var imageURL: URL {
-        let path = Bundle.main.path(forResource: imageName, ofType: "png", inDirectory: "Icons")!
-        return URL(fileURLWithPath: path)
-    }
-    
 #if os(macOS)
     private var icon: Image {
-        Image(nsImage: NSImage(byReferencing: imageURL))
+        Image(nsImage: NSImage(named: imageName)!)
     }
 #else
     private var icon: Image {
-        Image(uiImage: UIImage(contentsOfURL: imageURL)!)
+        Image(uiImage: UIImage(named: imageName)!)
     }
 #endif