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 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
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 {
--
Gitblit v1.9.3