From 2f1eb2c866abedf8608d587d4041afedbcbe654e Mon Sep 17 00:00:00 2001
From: Ariver <ar@MacBook-Air.local>
Date: Wed, 06 May 2026 17:19:11 +0800
Subject: [PATCH] checkpoint: v3.0.8 — 修复 hover 显示名称时容器抖动,文本始终渲染 opacity 控制显隐
---
Apptag/AppGridItem.swift | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/Apptag/AppGridItem.swift b/Apptag/AppGridItem.swift
index fbdeed4..b3b8141 100644
--- a/Apptag/AppGridItem.swift
+++ b/Apptag/AppGridItem.swift
@@ -26,14 +26,12 @@
)
.animation(.spring(response: 0.3, dampingFraction: 0.7), value: isHovered)
- if showName || isHovered {
- Text(app.name)
- .font(.system(size: 11, weight: .medium))
- .lineLimit(1)
- .truncationMode(.tail)
- .frame(maxWidth: iconSize + 20)
- .opacity(showName ? 1 : 0.85)
- }
+ Text(app.name)
+ .font(.system(size: 11, weight: .medium))
+ .lineLimit(1)
+ .truncationMode(.tail)
+ .frame(maxWidth: iconSize + 20)
+ .opacity(showName ? 1 : (isHovered ? 0.85 : 0))
}
.padding(.vertical, 8)
.padding(.horizontal, 4)
--
Gitblit v1.9.3