From 2182f72105033db025bb29e08319586112e53c5f Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Wed, 10 Jun 2026 19:37:25 +0800
Subject: [PATCH] Fix empty Space lane fill

---
 C1.source/Sources/Aligner/QuickSwitchRootView.swift |   30 +++++++++------
 C1.source/Resources/Aligner-Info.plist              |    4 +-
 C3.tools/round1-three-zone-linkage-fixture-qa.sh    |   28 ++++++++++----
 3 files changed, 40 insertions(+), 22 deletions(-)

diff --git a/C1.source/Resources/Aligner-Info.plist b/C1.source/Resources/Aligner-Info.plist
index 6c4daeb..cbb85aa 100644
--- a/C1.source/Resources/Aligner-Info.plist
+++ b/C1.source/Resources/Aligner-Info.plist
@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-    <string>0.0.51</string>
+    <string>0.0.52</string>
 	<key>CFBundleVersion</key>
-    <string>20260610.1637</string>
+    <string>20260610.1717</string>
 	<key>LSMinimumSystemVersion</key>
 	<string>26.0</string>
 	<key>NSHighResolutionCapable</key>
diff --git a/C1.source/Sources/Aligner/QuickSwitchRootView.swift b/C1.source/Sources/Aligner/QuickSwitchRootView.swift
index 3e34cf5..0d3590c 100644
--- a/C1.source/Sources/Aligner/QuickSwitchRootView.swift
+++ b/C1.source/Sources/Aligner/QuickSwitchRootView.swift
@@ -2151,7 +2151,9 @@
                     ? NSColor.labelColor.withAlphaComponent(0.34)
                 : NSColor.separatorColor.withAlphaComponent(0.34)
         ).cgColor
-        if isActive {
+        if !hasWindows {
+            applySpaceLaneSolidFill(to: segment.containerLayer, color: .clear)
+        } else if isActive {
             applySpaceLaneSolidFill(
                 to: segment.containerLayer,
                 color: accentTintedWindowBackground(fraction: 0.10, alpha: 0.94)
@@ -2166,25 +2168,29 @@
                 to: segment.containerLayer,
                 colors: spaceLaneIdleOccupiedGradientColors()
             )
-        } else {
-            applySpaceLaneSolidFill(to: segment.containerLayer, color: .clear)
         }
-        segment.containerLayer.shadowOpacity = isActive ? 0.26 : isAssociated ? 0.18 : isCurrent ? 0.14 : 0
-        segment.containerLayer.shadowRadius = isActive ? 24 : isAssociated ? 18 : isCurrent ? 12 : 0
+        segment.containerLayer.shadowOpacity = hasWindows
+            ? (isActive ? 0.26 : isAssociated ? 0.18 : isCurrent ? 0.14 : 0)
+            : 0
+        segment.containerLayer.shadowRadius = hasWindows
+            ? (isActive ? 24 : isAssociated ? 18 : isCurrent ? 12 : 0)
+            : 0
         segment.containerLayer.shadowOffset = CGSize(
             width: 0,
-            height: isActive ? -6 : isAssociated ? -4 : isCurrent ? -2.5 : 0
+            height: hasWindows ? (isActive ? -6 : isAssociated ? -4 : isCurrent ? -2.5 : 0) : 0
         )
         segment.containerLayer.zPosition = isActive ? 30 : isAssociated ? 18 : isCurrent ? 10 : 0
         segment.containerLayer.transform = (isActive || isAssociated)
             ? CATransform3DMakeScale(isActive ? 1.03 : 1.015, isActive ? 1.03 : 1.015, 1)
             : CATransform3DIdentity
-        segment.containerLayer.shadowPath = CGPath(
-            roundedRect: segment.containerLayer.bounds,
-            cornerWidth: segment.containerLayer.cornerRadius,
-            cornerHeight: segment.containerLayer.cornerRadius,
-            transform: nil
-        )
+        segment.containerLayer.shadowPath = hasWindows
+            ? CGPath(
+                roundedRect: segment.containerLayer.bounds,
+                cornerWidth: segment.containerLayer.cornerRadius,
+                cornerHeight: segment.containerLayer.cornerRadius,
+                transform: nil
+            )
+            : nil
     }
 
     private func shouldScrollSpaceLane(for event: NSEvent) -> Bool {
diff --git a/C3.tools/round1-three-zone-linkage-fixture-qa.sh b/C3.tools/round1-three-zone-linkage-fixture-qa.sh
index 84b821a..b32d5b8 100755
--- a/C3.tools/round1-three-zone-linkage-fixture-qa.sh
+++ b/C3.tools/round1-three-zone-linkage-fixture-qa.sh
@@ -613,18 +613,30 @@
 require(focused[0].get("label") == "B1", "hovered multi-display Space must be B1")
 require("focused" in focused[0].get("visualStates", []), "focused B1 segment must expose focused visual state")
 
-idle_empty_segments = [
+empty_segments = [
     segment for segment in segments
     if segment.get("windowCount") == 0
-    and segment.get("isFocused") is not True
-    and segment.get("isCurrent") is not True
-    and segment.get("isAppAssociated") is not True
-    and segment.get("isWindowAssociated") is not True
 ]
-require(idle_empty_segments, "multi-display visual fixture must include at least one idle empty Space")
+require(empty_segments, "multi-display visual fixture must include at least one empty Space")
 require(
-    all(segment.get("backgroundKind") == "clear" for segment in idle_empty_segments),
-    "idle empty Spaces must not keep a dirty gray fill"
+    {"A3", "B1"}.issubset({segment.get("label") for segment in empty_segments}),
+    "multi-display visual fixture must include the A3/B1 empty Space regression pair"
+)
+require(
+    all(segment.get("backgroundKind") == "clear" for segment in empty_segments),
+    "empty Spaces must not keep a dirty gray fill, even when focused/current/associated"
+)
+require(
+    all(not segment.get("gradientColors", []) for segment in empty_segments),
+    "empty Spaces must clear stale gradient colors"
+)
+require(
+    all(segment.get("backgroundColor", {}).get("alpha", 1) <= 0.01 for segment in empty_segments),
+    "empty Spaces must keep transparent fill"
+)
+require(
+    all(segment.get("shadowOpacity", 1) <= 0.01 for segment in empty_segments),
+    "empty Spaces must not draw a shadow that reads as an interior gray fill"
 )
 idle_occupied_segments = [
     segment for segment in segments

--
Gitblit v1.9.3