From 2d6bbe1773aaf2f74070a25e7e3032b811a3ab2b Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 28 May 2026 23:47:55 +0800
Subject: [PATCH] Enhance tag drag lift feedback
---
Apptag/TagNavigationView.swift | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Apptag/TagNavigationView.swift b/Apptag/TagNavigationView.swift
index 62cd16b..327ab7a 100644
--- a/Apptag/TagNavigationView.swift
+++ b/Apptag/TagNavigationView.swift
@@ -423,13 +423,15 @@
private func updateAppearance() {
let background = TagColor.nsColor(for: item.colorIndex)
+ let dragScale: CGFloat = isDragging ? 1.04 : 1.0
layer?.backgroundColor = background.cgColor
layer?.cornerRadius = orientation == .horizontal ? 7 : 6
- layer?.shadowColor = NSColor.black.withAlphaComponent(isDragging ? 0.38 : 0.20).cgColor
+ layer?.shadowColor = NSColor.black.withAlphaComponent(isDragging ? 0.50 : 0.20).cgColor
layer?.shadowOpacity = 1
- layer?.shadowRadius = isDragging ? 14 : 3
- layer?.shadowOffset = NSSize(width: 0, height: isDragging ? -7 : -1)
- layer?.zPosition = isDragging ? 20 : 0
+ layer?.shadowRadius = isDragging ? 18 : 3
+ layer?.shadowOffset = NSSize(width: 0, height: isDragging ? -9 : -1)
+ layer?.zPosition = isDragging ? 30 : 0
+ layer?.setAffineTransform(CGAffineTransform(scaleX: dragScale, y: dragScale))
alphaValue = dragModeActive ? (isDragging ? 1.0 : 0.62) : 1.0
let textColor: NSColor = (item.colorIndex == 0 || item.colorIndex == 5) ? .labelColor : .white
--
Gitblit v1.9.3