Quellcode durchsuchen

Refine desktop widget styling with subtle blue gradient

Replaces the flat blue fill on the desktop widget previews with a
shared Zoom-blue linear gradient plus soft top-leading highlight and
bottom shading for depth, and gives the header icon, meeting rows,
quick-action buttons, and action tiles light-to-dark micro-gradients
with slightly stronger borders so the inner controls feel polished
while keeping the white logo readable.

Co-authored-by: Cursor <cursoragent@cursor.com>
huzaifahayat12 vor 2 Monaten
Ursprung
Commit
2806e84662
1 geänderte Dateien mit 79 neuen und 14 gelöschten Zeilen
  1. 79 14
      zoom_app/ViewController.swift

+ 79 - 14
zoom_app/ViewController.swift

@@ -7732,6 +7732,19 @@ private extension WidgetVariant {
             return CGSize(width: 340, height: 288)
         }
     }
+
+    // Simple Zoom-blue palette shared by all widget sizes.
+    var gradientStops: [Color] {
+        [
+            Color(red: 0.04, green: 0.32, blue: 0.86),
+            Color(red: 0.10, green: 0.50, blue: 0.96)
+        ]
+    }
+
+    // Neutral highlight keeps the blue clean without washing out the logo.
+    var highlightTint: Color {
+        Color.white.opacity(0.16)
+    }
 }
 
 private enum WidgetSize: String, CaseIterable, Codable, Hashable {
@@ -8304,17 +8317,38 @@ private struct DesktopWidgetView: View {
             RoundedRectangle(cornerRadius: 22, style: .continuous)
                 .fill(
                     LinearGradient(
-                        colors: [
-                            Color(red: 0.11, green: 0.45, blue: 0.98),
-                            Color(red: 0.14, green: 0.72, blue: 0.98)
-                        ],
+                        colors: variant.gradientStops,
                         startPoint: .topLeading,
                         endPoint: .bottomTrailing
                     )
                 )
                 .overlay(
                     RoundedRectangle(cornerRadius: 22, style: .continuous)
-                        .stroke(Color.white.opacity(0.14), lineWidth: 1)
+                        .fill(
+                            RadialGradient(
+                                colors: [variant.highlightTint, Color.clear],
+                                center: .topLeading,
+                                startRadius: 4,
+                                endRadius: 200
+                            )
+                        )
+                        .blendMode(.plusLighter)
+                        .allowsHitTesting(false)
+                )
+                .overlay(
+                    RoundedRectangle(cornerRadius: 22, style: .continuous)
+                        .fill(
+                            LinearGradient(
+                                colors: [Color.clear, Color.black.opacity(0.18)],
+                                startPoint: .top,
+                                endPoint: .bottom
+                            )
+                        )
+                        .allowsHitTesting(false)
+                )
+                .overlay(
+                    RoundedRectangle(cornerRadius: 22, style: .continuous)
+                        .stroke(Color.white.opacity(0.16), lineWidth: 1)
                 )
 
             VStack(alignment: .leading, spacing: 12) {
@@ -8358,9 +8392,22 @@ private struct DesktopWidgetView: View {
         HStack(spacing: 10) {
             Image(systemName: "video.fill")
                 .font(.system(size: 16, weight: .bold))
-                .foregroundStyle(.white.opacity(0.92))
+                .foregroundStyle(.white.opacity(0.95))
                 .frame(width: 30, height: 30)
-                .background(RoundedRectangle(cornerRadius: 8, style: .continuous).fill(Color.black.opacity(0.18)))
+                .background(
+                    RoundedRectangle(cornerRadius: 8, style: .continuous)
+                        .fill(
+                            LinearGradient(
+                                colors: [Color.white.opacity(0.22), Color.black.opacity(0.18)],
+                                startPoint: .top,
+                                endPoint: .bottom
+                            )
+                        )
+                )
+                .overlay(
+                    RoundedRectangle(cornerRadius: 8, style: .continuous)
+                        .stroke(Color.white.opacity(0.18), lineWidth: 1)
+                )
             VStack(alignment: .leading, spacing: 2) {
                 Text(variant.title)
                     .font(.system(size: 16, weight: .bold))
@@ -8420,11 +8467,17 @@ private struct DesktopWidgetView: View {
             .padding(.vertical, 7)
             .background(
                 RoundedRectangle(cornerRadius: 10, style: .continuous)
-                    .fill(Color.black.opacity(0.20))
+                    .fill(
+                        LinearGradient(
+                            colors: [Color.white.opacity(0.14), Color.black.opacity(0.22)],
+                            startPoint: .top,
+                            endPoint: .bottom
+                        )
+                    )
             )
             .overlay(
                 RoundedRectangle(cornerRadius: 10, style: .continuous)
-                    .stroke(Color.white.opacity(0.08), lineWidth: 1)
+                    .stroke(Color.white.opacity(0.12), lineWidth: 1)
             )
         }
         .buttonStyle(.plain)
@@ -8450,11 +8503,17 @@ private struct DesktopWidgetView: View {
             .frame(maxWidth: .infinity)
             .background(
                 RoundedRectangle(cornerRadius: 12, style: .continuous)
-                    .fill(Color.black.opacity(0.30))
+                    .fill(
+                        LinearGradient(
+                            colors: [Color.white.opacity(0.20), Color.black.opacity(0.28)],
+                            startPoint: .top,
+                            endPoint: .bottom
+                        )
+                    )
             )
             .overlay(
                 RoundedRectangle(cornerRadius: 12, style: .continuous)
-                    .stroke(Color.white.opacity(0.24), lineWidth: 1)
+                    .stroke(Color.white.opacity(0.26), lineWidth: 1)
             )
         }
         .buttonStyle(.plain)
@@ -8472,16 +8531,22 @@ private struct DesktopWidgetView: View {
                     .lineLimit(1)
                 Spacer(minLength: 0)
             }
-            .foregroundStyle(.white.opacity(0.92))
+            .foregroundStyle(.white.opacity(0.95))
             .padding(.horizontal, 10)
             .padding(.vertical, 9)
             .background(
                 RoundedRectangle(cornerRadius: 12, style: .continuous)
-                    .fill(Color.black.opacity(0.24))
+                    .fill(
+                        LinearGradient(
+                            colors: [Color.white.opacity(0.16), Color.black.opacity(0.22)],
+                            startPoint: .top,
+                            endPoint: .bottom
+                        )
+                    )
             )
             .overlay(
                 RoundedRectangle(cornerRadius: 12, style: .continuous)
-                    .stroke(Color.white.opacity(0.10), lineWidth: 1)
+                    .stroke(Color.white.opacity(0.16), lineWidth: 1)
             )
         }
         .buttonStyle(.plain)