Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e971d5f8d |
@@ -97,7 +97,9 @@ final class OverlayView: NSView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Esc hint — the only way out once clicks are consumed by the tap.
|
// 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] = [
|
let hintAttrs: [NSAttributedString.Key: Any] = [
|
||||||
.font: NSFont.monospacedSystemFont(ofSize: 12, weight: .medium),
|
.font: NSFont.monospacedSystemFont(ofSize: 12, weight: .medium),
|
||||||
.foregroundColor: NSColor.white.withAlphaComponent(0.85),
|
.foregroundColor: NSColor.white.withAlphaComponent(0.85),
|
||||||
@@ -115,22 +117,17 @@ final class OverlayView: NSView {
|
|||||||
|
|
||||||
guard let controller else { return }
|
guard let controller else { return }
|
||||||
|
|
||||||
// Frozen mode: no window highlight; the marquee is cut straight out
|
// Frozen mode: same look as live mode — a dark veil over everything,
|
||||||
// of the still image so it shows the frozen pixels.
|
// with the selection showing the frozen pixels undimmed.
|
||||||
if frozenImage != nil {
|
if let frozenImage {
|
||||||
|
NSColor.black.withAlphaComponent(0.35).setFill()
|
||||||
|
NSBezierPath(rect: bounds).fill()
|
||||||
|
|
||||||
if let sel = controller.marqueeRect, sel.width > 0, sel.height > 0 {
|
if let sel = controller.marqueeRect, sel.width > 0, sel.height > 0 {
|
||||||
let vf = viewRect(sel)
|
let vf = viewRect(sel)
|
||||||
// Dim everything except the selection (even-odd fill).
|
|
||||||
let maskPath = CGMutablePath()
|
|
||||||
maskPath.addRect(bounds)
|
|
||||||
maskPath.addRect(vf)
|
|
||||||
NSGraphicsContext.current?.saveGraphicsState()
|
NSGraphicsContext.current?.saveGraphicsState()
|
||||||
let ctx = NSGraphicsContext.current?.cgContext
|
NSBezierPath(rect: vf).addClip()
|
||||||
ctx?.addPath(maskPath)
|
drawFrozen(frozenImage)
|
||||||
ctx?.fillPath(using: .evenOdd)
|
|
||||||
NSColor.black.withAlphaComponent(0.35).setFill()
|
|
||||||
ctx?.addPath(maskPath)
|
|
||||||
ctx?.fillPath(using: .evenOdd)
|
|
||||||
NSGraphicsContext.current?.restoreGraphicsState()
|
NSGraphicsContext.current?.restoreGraphicsState()
|
||||||
|
|
||||||
let border = NSBezierPath(rect: vf)
|
let border = NSBezierPath(rect: vf)
|
||||||
|
|||||||
+2
-2
@@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST'
|
|||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>Icon</string>
|
<string>Icon</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.10.0</string>
|
<string>1.10.1</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>100</string>
|
<string>101</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user