| | |
| | | ? 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) |
| | |
| | | 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( |
| | | 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 { |