ソースを参照

Improve hover zoom on tiles

Made-with: Cursor
huzaifahayat12 3 ヶ月 前
コミット
82d75f62a8
2 ファイル変更7 行追加7 行削除
  1. 5 5
      google_apps/AppTileView.swift
  2. 2 2
      google_apps/LauncherRootView.swift

+ 5 - 5
google_apps/AppTileView.swift

@@ -128,16 +128,16 @@ struct AppTileView: View {
                 .stroke(Color.white.opacity(isHovering ? 0.18 : 0.08), lineWidth: 1)
         )
         .shadow(
-            color: .black.opacity(isHovering ? 0.18 : 0.10),
-            radius: isHovering ? 16 : 10,
+            color: .black.opacity(isHovering ? 0.20 : 0.10),
+            radius: isHovering ? 18 : 10,
             x: 0,
-            y: isHovering ? 10 : 6
+            y: isHovering ? 12 : 6
         )
-        .scaleEffect(isHovering ? 1.03 : 1.0)
+        .scaleEffect(isHovering ? 1.05 : 1.0)
         // Ensure tiles look consistent across the adaptive grid.
         .frame(maxWidth: .infinity, minHeight: 94)
         .contentShape(RoundedRectangle(cornerRadius: tileCornerRadius, style: .continuous))
-        .animation(.easeOut(duration: 0.12), value: isHovering)
+        .animation(.spring(response: 0.22, dampingFraction: 0.82), value: isHovering)
     }
 
     private var isPinned: Bool {

+ 2 - 2
google_apps/LauncherRootView.swift

@@ -654,8 +654,8 @@ private struct PanelAppRowView: View {
         ZStack(alignment: .topTrailing) {
             HStack(spacing: 14) {
                 AppIconGlyph(app: app)
-                    .scaleEffect(isHovering ? 1.03 : 1.0)
-                    .animation(.spring(response: 0.22, dampingFraction: 0.85), value: isHovering)
+                    .scaleEffect(isHovering ? 1.05 : 1.0, anchor: .leading)
+                    .animation(.spring(response: 0.22, dampingFraction: 0.82), value: isHovering)
                 Text(app.name)
                     .font(.system(size: 18, weight: .medium))
                     .foregroundStyle(.white.opacity(0.94))