The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.
Fullscreen sidebar tint built like AppKit's; no capture kept under the inactive fill (#132) (#140)
Victor Kildahldab72d7f0c62
diff --git a/Sources/Cra/UI/ShellView.swift b/Sources/Cra/UI/ShellView.swiftindex 27ec906..affc280 100644--- a/Sources/Cra/UI/ShellView.swift+++ b/Sources/Cra/UI/ShellView.swift@@ -130,6 +130,17 @@ final class ShellView: NSView {return filter}+ /// The hudWindow material's filters on its desktop tint: SDR normalize, saturate 1.6.+ static func makeTintFilters() -> [NSObject] {+ guard let cls = NSClassFromString("CAFilter") as? NSObject.Type else { return [] }+ let sel = NSSelectorFromString("filterWithType:")+ guard cls.responds(to: sel) else { return [] }+ let make = { (type: String) in cls.perform(sel, with: type)?.takeUnretainedValue() as? NSObject }+ guard let normalize = make("sdrNormalize"), let saturate = make("colorSaturate") else { return [] }+ saturate.setValue(1.6, forKey: "inputAmount")+ return [normalize, saturate]+ }+/// Which blur path this run takes, once: scenarios run both (CRA_FLAGS) and the/// log says which one a crash or a stall happened on.private static var loggedBackdropPath = false@@ -150,17 +161,24 @@ final class ShellView: NSView {backdropHost.isHidden = falseCATransaction.begin(); CATransaction.setDisableActions(true)let tint = windowFullscreen && desktopTintLayer != nil- backdropLayer?.isHidden = tint- desktopTintLayer?.isHidden = !tint// Solid: Arc's material is grey 66 passing 52 % of the backdrop, flat 212 while inactive.- dimLayer.opacity = Float(solidBackdrop ? (windowActive ? 0.30 : 1) : windowActive ? t.blurDim : t.blurDimInactive)+ let dim = solidBackdrop ? (windowActive ? 0.30 : 1) : windowActive ? t.blurDim : t.blurDimInactive+ dimLayer.opacity = Float(dim)+ // NSVisualEffectView keeps only the layer it draws from in the tree: no capture under an+ // opaque fill, the desktop tint instead of the blur in fullscreen. A capture added back+ // on activation draws the substitute colour until it is live, where one kept under the+ // fill showed the window behind sharp for a frame (GitHub #132).+ let source = dim >= 1 ? nil : tint ? desktopTintLayer : backdropLayer+ for l in [backdropLayer, desktopTintLayer].compactMap({ $0 }) where (l === source) != (l.superlayer != nil) {+ if l === source { backdropHost.layer?.insertSublayer(l, at: 0) } else { l.removeFromSuperlayer() }+ }let top = solidBackdrop ? (windowActive ? 0.26 : 0.83) : windowActive ? t.liftActive : t.liftInactivelet bottom = solidBackdrop ? top : windowActive ? t.liftActiveBottom : t.liftInactiveliftLayer.colors = [NSColor(white: 1, alpha: top).cgColor, NSColor(white: 1, alpha: bottom).cgColor]CATransaction.commit()// One line per change, so a report of a sharp or off-colour sidebar can be matched// to the window's state in cra.log.- let state = "\(tint ? "desktop tint" : "blur"), \(windowActive ? "active" : "inactive")"+ let state = "\(source == nil ? "flat" : tint ? "desktop tint" : "blur"), \(windowActive ? "active" : "inactive"), dim \(String(format: "%.2f", dim))"if state != loggedBackdrop {loggedBackdrop = stateCraLog.note("sidebar backdrop: " + state)@@ -213,10 +231,12 @@ final class ShellView: NSView {if b.responds(to: NSSelectorFromString("setAllowsSubstituteColor:")) { b.setValue(true, forKey: "allowsSubstituteColor") }backdropHost.layer?.addSublayer(b)backdropLayer = b+ // AppKit's tint carries the material's colour filters, not the blur (hudWindow). Bare,+ // it skipped the SDR normalize and the saturate: the fullscreen sidebar came out greyer+ // than Arc's, and dark on the display in GitHub #132.if let tintClass = NSClassFromString("CAChameleonLayer") as? CALayer.Type {let t = tintClass.init()- t.isHidden = true- backdropHost.layer?.addSublayer(t)+ t.filters = ShellView.makeTintFilters()desktopTintLayer = t}}diff --git a/docs/arc-reverse-engineering.md b/docs/arc-reverse-engineering.mdindex 8e94a39..5481c12 100644--- a/docs/arc-reverse-engineering.md+++ b/docs/arc-reverse-engineering.md@@ -1861,6 +1861,19 @@ Theme palettes in a hand-built space can be borrowed; only the `background` stylbuild in none of 3 (other sessions' windows moved between runs, so take that as a hint). Not seen here: thesharp sidebar on activation from Mission Control, Finder or a fullscreen Space (1x displays).`screencapture` stills are no use for this: they disagreed with recordings of the same state.+- [O] Follow-up (3 Nov 2026, issue #132: on another Mac the fullscreen solid sidebar rested ~60 levels darker than+ Arc in the same space). NSVisualEffectView's hudWindow tree, dumped from a probe: windowed active = backdrop+ (sdrNormalize, gaussianBlur 30, colorSaturate 1.6, `scale` 0.125, `substituteColor` nil: the window server picks+ the substitute) + fill + tone + the `CAChameleonLayer` at opacity 0.05; fullscreen = the backdrop REMOVED from+ the tree, the chameleon first at opacity 1 with `[sdrNormalize, colorSaturate 1.6]` and no blur. CAChameleonLayer+ has no properties of its own. Cra's tint was bare (no filters) and its blur only hidden. On this Mac's SDR+ displays a bare chameleon already resolves the wallpaper (194/166/146; with the filters 209/163/131) and a hidden+ blur beside it changes nothing, so the dark rest did not reproduce; the filters are the one difference left+ against Arc's layer, and `sdrNormalize` is the EDR-display step. Cra now builds the tint with those filters and+ keeps only the layer it draws from in the tree, like AppKit (none while inactive, under the opaque fill).+ CloudDev (#F25E6B, 0.8) fullscreen, stills: 214/116/119 before, 217/114/117 after (Arc on #132's Mac 210/110/117).+ A Space swipe reads the inactive value until the app is active again, then steps in one frame, as AppKit's+ material does (`followsWindowActiveState`).- [O] Tab list scroller: AppKit overlay scroller (AXScrollBar, 17 pt track) shown while scrolling, then faded;the knob is 4 pt wide, 3 pt in from the sidebar edge, white 49 % on a dark theme, no track. Cra:`SidebarScroller`, 10 pt wide so it stays in the gutter right of the rows (knob on Arc's exact columns).