Skip to content

armgit / cra

Public Imported from GitHub
0

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.

Arc parity: an Easel shows the space's backdrop, veiled, as Arc's canvas does

Victorbb1ac55a32ae
diff --git a/Sources/Cra/UI/Easel/EaselBrowser.swift b/Sources/Cra/UI/Easel/EaselBrowser.swift
index 1ba3c90..ed48cfe 100644
--- a/Sources/Cra/UI/Easel/EaselBrowser.swift
+++ b/Sources/Cra/UI/Easel/EaselBrowser.swift
@@ -41,6 +41,9 @@ final class EaselBrowser: CraBrowser, NativePage {
self.delegate?.browser?(self, didChangeCommittedLoad: true)
self.delegate?.browser(self, didChangeLoading: false, canGoBack: false, canGoForward: false)
self.delegate?.browser(self, didFinishLoadingURL: self.address, title: title, statusCode: 200)
+ // Arc's canvas is the window's backdrop under a 50 % black veil (#63614B over a gold
+ // space's #C6BE96 sidebar): the card lets the backdrop through, the canvas veils it.
+ self.delegate?.browser?(self, didReportBackgroundColor: "clear")
}
}
diff --git a/Sources/Cra/UI/Easel/EaselCanvasView.swift b/Sources/Cra/UI/Easel/EaselCanvasView.swift
index 52043fc..a8b4ec1 100644
--- a/Sources/Cra/UI/Easel/EaselCanvasView.swift
+++ b/Sources/Cra/UI/Easel/EaselCanvasView.swift
@@ -23,6 +23,7 @@ final class EaselCanvasView: NSView {
sheet = EaselSheetView(document: document)
super.init(frame: .zero)
wantsLayer = true
+ layer?.backgroundColor = NSColor(white: 0, alpha: 0.5).cgColor
scroll.drawsBackground = false
scroll.hasVerticalScroller = true
scroll.autohidesScrollers = true
diff --git a/Sources/Cra/UI/SplitView/PaneCardView.swift b/Sources/Cra/UI/SplitView/PaneCardView.swift
index e9e4f11..e61c5d2 100644
--- a/Sources/Cra/UI/SplitView/PaneCardView.swift
+++ b/Sources/Cra/UI/SplitView/PaneCardView.swift
@@ -169,7 +169,8 @@ final class PaneCardView: NSView {
layer?.backgroundColor = transparent || hasPage ? NSColor.clear.cgColor : NSColor(white: 1, alpha: isDark ? 0.08 : 0.2).cgColor
let bar = developerBar ?? toolbarColor.map { NSColor(Color(hex: $0)) } ?? .white
toolbarBackground.layer?.backgroundColor = (hasPage && !transparent ? bar : NSColor.clear).cgColor
- let page = pageColor.map { NSColor(Color(hex: $0)) } ?? CraBrowser.pageCanvasColor
+ // "clear": a page of Cra's own that lets the window's backdrop through (an Easel, as in Arc).
+ let page = pageColor == "clear" ? NSColor.clear : pageColor.map { NSColor(Color(hex: $0)) } ?? CraBrowser.pageCanvasColor
pageBackground.layer?.backgroundColor = (hasPage && !transparent ? page : NSColor.clear).cgColor
hairline.isHidden = hasPage || transparent || !showToolbar
hairline.layer?.backgroundColor = NSColor(white: isDark ? 1 : 0, alpha: 0.08).cgColor
diff --git a/docs/arc-parity.md b/docs/arc-parity.md
index bdbadb8..e6f5d8d 100644
--- a/docs/arc-parity.md
+++ b/docs/arc-parity.md
@@ -15,7 +15,7 @@ or Arc-only service), per CONTRIBUTING.md.
| Arc feature | Where in Arc | Cra | Notes |
|---|---|---|---|
| Boosts (per-site CSS/JS, colours, fonts, Zap) | URL bar ✎, Library ▸ Boosts, Settings ▸ Advanced "Enable Boosts" | missing | Biggest local feature still absent. |
-| Easels | File ▸ New Easel ⌃⇧E, Library ▸ Easels | partial | File ▸ New Easel (⌃⇧E): canvas, title, Pointer/Image/Text/Ellipse/Rectangle/Arrow/Freehand, pictures by file, paste or drop, saved per easel. Library ▸ Easels and Window ▸ View Easels… done. Missing: the canvas's backdrop colour (Cra's is black), the text-size pill, captures into an easel; sharing is *skip* (cloud). |
+| Easels | File ▸ New Easel ⌃⇧E, Library ▸ Easels | partial | File ▸ New Easel (⌃⇧E): canvas, title, Pointer/Image/Text/Ellipse/Rectangle/Arrow/Freehand, pictures by file, paste or drop, saved per easel. Library ▸ Easels and Window ▸ View Easels… done. The canvas shows the window's backdrop under a 50 % veil as in Arc. Missing: the toolbar strip above it stays white (Arc's blends into the canvas), the text-size pill, captures into an easel; sharing is *skip* (cloud). |
| Notes | File ▸ New Note ⌃⇧N, ⌃⌥N in split, Help ▸ Export Arc Notes | *skip* | Arc 1.172.1 no longer creates Notes: New Note is gone from the File menu and ⌃⇧N does nothing; only Help ▸ Export Arc Notes is left. |
| Library ▸ Media | Window ▸ View Media…, Library rail | done | Off until Show Media; ⋯ picks the folders (Cra has no captures folder). |
| Essential Keyboard Shortcuts window | Help ▸ Essential Keyboard Shortcuts, Settings ▸ Shortcuts | done | 475×462 floating dark panel, five rows of key caps, "View All ↗". |