فهرست منبع

Polish Gmail compact widget layout and sizing.

Refine compact typography and spacing, keep unread count and label on one line, remove helper copy, and reduce compact panel dimensions to eliminate extra bottom space.

Made-with: Cursor
huzaifahayat12 3 ماه پیش
والد
کامیت
d2249dc108
2فایلهای تغییر یافته به همراه14 افزوده شده و 18 حذف شده
  1. 12 16
      google_apps/Widgets/GmailDesktopWidgetView.swift
  2. 2 2
      google_apps/Widgets/WidgetTemplates.swift

+ 12 - 16
google_apps/Widgets/GmailDesktopWidgetView.swift

@@ -33,37 +33,33 @@ struct GmailDesktopWidgetView: View {
         ZStack(alignment: .topLeading) {
             gmailGradientBackground
                 .frame(maxWidth: .infinity, maxHeight: .infinity)
-            VStack(alignment: .leading, spacing: 10) {
-                HStack(spacing: 10) {
-                    AppIconView(app: app, size: 32, showAppBackground: false, iconPaddingFactor: 0.08)
+            VStack(alignment: .leading, spacing: 8) {
+                HStack(spacing: 8) {
+                    AppIconView(app: app, size: 30, showAppBackground: false, iconPaddingFactor: 0.08)
                     VStack(alignment: .leading, spacing: 2) {
                         Text(app.name)
-                            .font(.system(size: 14, weight: .bold))
+                            .font(.system(size: 13, weight: .bold))
                             .foregroundStyle(.white.opacity(0.95))
                         Text("Unread")
-                            .font(.system(size: 10, weight: .semibold))
+                            .font(.system(size: 9, weight: .semibold))
                             .foregroundStyle(.white.opacity(0.65))
                     }
                     Spacer(minLength: 0)
                 }
 
-                HStack(alignment: .firstTextBaseline, spacing: 6) {
+                HStack(spacing: 6) {
                     Text(unreadCountStored < 0 ? "—" : "\(unreadCountStored)")
-                        .font(.system(size: 36, weight: .bold, design: .rounded))
+                        .font(.system(size: 32, weight: .bold, design: .rounded))
                         .foregroundStyle(.white)
-                        .minimumScaleFactor(0.5)
                         .lineLimit(1)
+                        .minimumScaleFactor(0.7)
                     Text("messages")
-                        .font(.system(size: 11, weight: .medium))
+                        .font(.system(size: 10, weight: .medium))
                         .foregroundStyle(.white.opacity(0.7))
+                        .lineLimit(1)
                     Spacer(minLength: 0)
                 }
-
-                Text("Local count only — use Open Mail for your live inbox.")
-                    .font(.system(size: 9, weight: .medium))
-                    .foregroundStyle(.white.opacity(0.52))
-                    .lineLimit(2)
-                    .fixedSize(horizontal: false, vertical: true)
+                .lineLimit(1)
 
                 compactButton(title: "Open Mail", systemImage: "envelope.open", emphasized: false) {
                     openMailInBrowser()
@@ -78,7 +74,7 @@ struct GmailDesktopWidgetView: View {
                     }
                 }
             }
-            .padding(14)
+            .padding(12)
             .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
         }
         .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)

+ 2 - 2
google_apps/Widgets/WidgetTemplates.swift

@@ -592,7 +592,7 @@ extension WidgetLayoutMode {
         switch self {
         case .gmail(let mode):
             switch mode {
-            case .compact: return CGSize(width: 220, height: 220)
+            case .compact: return CGSize(width: 204, height: 192)
             case .interactive: return CGSize(width: 540, height: 580)
             }
         case .drive(let mode):
@@ -663,7 +663,7 @@ extension WidgetLayoutMode {
         switch self {
         case .gmail(let mode):
             switch mode {
-            case .compact: return CGSize(width: 200, height: 200)
+            case .compact: return CGSize(width: 186, height: 176)
             case .interactive: return CGSize(width: 480, height: 440)
             }
         case .drive(let mode):