瀏覽代碼

Add the Gramora logo asset across the app icon and sidebar branding.

Replace the placeholder mark with the real logo and slightly increase its size for better visibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 1 月之前
父節點
當前提交
8f473fde95

+ 10 - 0
gramora/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,51 +1,61 @@
 {
   "images" : [
     {
+      "filename" : "icon_16x16.png",
       "idiom" : "mac",
       "scale" : "1x",
       "size" : "16x16"
     },
     {
+      "filename" : "icon_16x16@2x.png",
       "idiom" : "mac",
       "scale" : "2x",
       "size" : "16x16"
     },
     {
+      "filename" : "icon_32x32.png",
       "idiom" : "mac",
       "scale" : "1x",
       "size" : "32x32"
     },
     {
+      "filename" : "icon_32x32@2x.png",
       "idiom" : "mac",
       "scale" : "2x",
       "size" : "32x32"
     },
     {
+      "filename" : "icon_128x128.png",
       "idiom" : "mac",
       "scale" : "1x",
       "size" : "128x128"
     },
     {
+      "filename" : "icon_128x128@2x.png",
       "idiom" : "mac",
       "scale" : "2x",
       "size" : "128x128"
     },
     {
+      "filename" : "icon_256x256.png",
       "idiom" : "mac",
       "scale" : "1x",
       "size" : "256x256"
     },
     {
+      "filename" : "icon_256x256@2x.png",
       "idiom" : "mac",
       "scale" : "2x",
       "size" : "256x256"
     },
     {
+      "filename" : "icon_512x512.png",
       "idiom" : "mac",
       "scale" : "1x",
       "size" : "512x512"
     },
     {
+      "filename" : "icon_512x512@2x.png",
       "idiom" : "mac",
       "scale" : "2x",
       "size" : "512x512"

二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_128x128.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_16x16.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_256x256.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_32x32.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_512x512.png


二進制
gramora/Resources/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png


二進制
gramora/Resources/Assets.xcassets/AppLogo.imageset/AppLogo.png


二進制
gramora/Resources/Assets.xcassets/AppLogo.imageset/AppLogo@2x.png


二進制
gramora/Resources/Assets.xcassets/AppLogo.imageset/AppLogo@3x.png


+ 23 - 0
gramora/Resources/Assets.xcassets/AppLogo.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "AppLogo.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "AppLogo@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "AppLogo@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 1 - 1
gramora/Utilities/AppTheme.swift

@@ -8,7 +8,7 @@ enum AppTheme {
 
     static let sidebarWidth: CGFloat = 240
     static let headerTopInset: CGFloat = 24
-    static let logoMarkSize: CGFloat = 36
+    static let logoMarkSize: CGFloat = 42
     /// Reserved width for native close / minimize / zoom buttons (top-left).
     static let trafficLightReservedWidth: CGFloat = 78
     /// Standard macOS title bar height for hidden-title-bar windows.

+ 14 - 0
gramora/Views/Components/AppLogoMark.swift

@@ -0,0 +1,14 @@
+import SwiftUI
+
+struct AppLogoMark: View {
+    var size: CGFloat = AppTheme.logoMarkSize
+
+    var body: some View {
+        Image("AppLogo")
+            .resizable()
+            .interpolation(.high)
+            .scaledToFit()
+            .frame(width: size, height: size)
+            .accessibilityLabel("Gramora")
+    }
+}

+ 2 - 10
gramora/Views/SidebarView.swift

@@ -48,18 +48,10 @@ struct SidebarView: View {
 
     private var logoHeader: some View {
         HStack(spacing: 10) {
-            ZStack {
-                Circle()
-                    .fill(AppTheme.teal)
-                    .frame(width: AppTheme.logoMarkSize, height: AppTheme.logoMarkSize)
-
-                Text("G")
-                    .font(.system(size: 18, weight: .bold))
-                    .foregroundStyle(.white)
-            }
+            AppLogoMark()
 
             Text("Gramora")
-                .font(.system(size: 18, weight: .bold))
+                .font(.system(size: 19, weight: .bold))
                 .foregroundStyle(AppTheme.textPrimary)
         }
     }