Compare commits

..
1 Commits
Author SHA1 Message Date
TZGyn 2e971d5f8d Darken the screen in frozen capture mode
Frozen mode showed the still image at full brightness until a selection
existed, unlike live mode's dark veil. It now draws the same 35% veil over
everything and re-draws the selected area from the snapshot, keeping the
selection bright. The hint text matches the mode.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4-flash-0731
2026-09-25 17:43:59 +08:00
2 changed files with 13 additions and 16 deletions
+11 -14
View File
@@ -97,7 +97,9 @@ final class OverlayView: NSView {
}
// Esc hint — the only way out once clicks are consumed by the tap.
let hint = "Drag to select · hover + click a window to capture it · Esc to cancel"
let hint = frozenImage != nil
? "Frozen screen · drag to select · Esc to cancel"
: "Drag to select · hover + click a window to capture it · Esc to cancel"
let hintAttrs: [NSAttributedString.Key: Any] = [
.font: NSFont.monospacedSystemFont(ofSize: 12, weight: .medium),
.foregroundColor: NSColor.white.withAlphaComponent(0.85),
@@ -115,22 +117,17 @@ final class OverlayView: NSView {
guard let controller else { return }
// Frozen mode: no window highlight; the marquee is cut straight out
// of the still image so it shows the frozen pixels.
if frozenImage != nil {
// Frozen mode: same look as live mode — a dark veil over everything,
// with the selection showing the frozen pixels undimmed.
if let frozenImage {
NSColor.black.withAlphaComponent(0.35).setFill()
NSBezierPath(rect: bounds).fill()
if let sel = controller.marqueeRect, sel.width > 0, sel.height > 0 {
let vf = viewRect(sel)
// Dim everything except the selection (even-odd fill).
let maskPath = CGMutablePath()
maskPath.addRect(bounds)
maskPath.addRect(vf)
NSGraphicsContext.current?.saveGraphicsState()
let ctx = NSGraphicsContext.current?.cgContext
ctx?.addPath(maskPath)
ctx?.fillPath(using: .evenOdd)
NSColor.black.withAlphaComponent(0.35).setFill()
ctx?.addPath(maskPath)
ctx?.fillPath(using: .evenOdd)
NSBezierPath(rect: vf).addClip()
drawFrozen(frozenImage)
NSGraphicsContext.current?.restoreGraphicsState()
let border = NSBezierPath(rect: vf)
+2 -2
View File
@@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST'
<key>CFBundleIconFile</key>
<string>Icon</string>
<key>CFBundleShortVersionString</key>
<string>1.10.0</string>
<string>1.10.1</string>
<key>CFBundleVersion</key>
<string>100</string>
<string>101</string>
<key>LSUIElement</key>
<true/>
<key>NSHighResolutionCapable</key>