Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/spec/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,28 @@ Defines:

- Settings must include a Permissions section.
- Screen Recording permission is required for the current native macOS capture host.
- Settings must present Screen Recording as the only permission needed by the current native macOS
capture host.
- When Screen Recording is missing at launch or at capture start, Rsnap must open the macOS Screen
Recording privacy page and present a small Rsnap-owned floating drag guide near System Settings.
- Accessibility and Input Monitoring may be displayed as diagnostic permissions, but they must not
be presented as required when the current native host does not need them.
- Accessibility and Input Monitoring must not be displayed in Settings while the current native host
does not need them.
- Permission recovery should provide a visible drag-the-app affordance for adding Rsnap to System
Settings where macOS allows that workflow, including a directional guide from the floating window
toward System Settings and an Open System Settings fallback.
- Permission status refresh must be available without restarting Rsnap.

## About Settings

- Settings must include an About section.
- The About section must identify Yvette Cipher as the creator and describe Rsnap as an
open-source macOS capture tool.
- The About section must include external links to `https://github.com/hack-ink/rsnap` and
`https://x.com/YvetteCipher`.
- The creator link may encourage following for ongoing Rsnap updates and may state that follows
help support future work through X creator rewards.
- The About section must not expose capture defaults or a Restore Defaults action.

## Default-Size Usability

- At the default Settings window size, primary setting labels, selected option labels, and current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ final class LiveChromeLiquidGlassView: NSView {
}
return Color(
hue: settings.hudTintHue.clamped(to: 0...1),
saturation: 0.48,
brightness: 1.0,
saturation: settings.hudTintSaturation.clamped(to: 0...1),
brightness: settings.hudTintBrightness.clamped(to: 0...1),
opacity: strength * 0.12
)
}
Expand Down
22 changes: 18 additions & 4 deletions native/macos-host/Sources/RsnapNativeHostKit/NativeHostApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6364,13 +6364,25 @@ final class CaptureHostView: NSView {
}

private func updateLiveChromeBackdrops(hudFrame: CGRect?, loupeFrame: CGRect?) {
controller?.updateLiveChromeBackdrops(nil)
hideClassicGlassMaterialViews()
guard scene.mode == .live, settings.usesClassicHudGlass else {
controller?.updateLiveChromeBackdrops(nil)
return
}
controller?.updateLiveChromeBackdrops(
LiveChromeBackdropSnapshot(
sourceWindowNumber: window?.windowNumber,
hudFrame: hudFrame.flatMap(globalRect(from:)),
loupeFrame: loupeFrame.flatMap(globalRect(from:)),
theme: chromeTheme(),
settings: settings
)
)
}

private func moveLiveChromeLayers() {
let frames = currentLiveChromeLayerFrames()
hideClassicGlassMaterialViews()
updateLiveChromeBackdrops(hudFrame: frames.hud, loupeFrame: frames.loupe)
moveExistingLiveLiquidGlassViews(hudFrame: frames.hud, loupeFrame: frames.loupe)
liveRenderer.moveLiveChrome(hudFrame: frames.hud, loupeFrame: frames.loupe)
}
Expand Down Expand Up @@ -8754,10 +8766,12 @@ enum CaptureChrome {
for theme: CaptureChromeTheme, settings: NativeHostSettings
) -> NSColor {
let hue = CGFloat(settings.hudTintHue.clamped(to: 0...1))
let saturation = CGFloat(settings.hudTintSaturation.clamped(to: 0...1))
let brightness = CGFloat(settings.hudTintBrightness.clamped(to: 0...1))
return NSColor(
calibratedHue: hue,
saturation: theme == .dark ? 0.48 : 0.34,
brightness: theme == .dark ? 0.62 : 0.94,
saturation: saturation,
brightness: brightness,
alpha: 1
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
showWindow(nil)
NSRunningApplication.current.activate(options: [.activateAllWindows])
window?.makeKeyAndOrderFront(nil)
window?.invalidateShadow()
NSApp.activate(ignoringOtherApps: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ final class NativeHostSettingsStore {
static let hudBlur = "hudBlur"
static let hudTint = "hudTint"
static let hudTintHue = "hudTintHue"
static let hudTintSaturation = "hudTintSaturation"
static let hudTintBrightness = "hudTintBrightness"
static let liquidGlassStyle = "liquidGlassStyle"
static let loupeSampleSize = "loupeSampleSize"
}
Expand Down Expand Up @@ -62,6 +64,10 @@ final class NativeHostSettingsStore {
?? baseSettings.hudTint,
hudTintHue: defaults.object(forKey: DefaultsKey.hudTintHue) as? Double
?? baseSettings.hudTintHue,
hudTintSaturation: defaults.object(forKey: DefaultsKey.hudTintSaturation) as? Double
?? baseSettings.hudTintSaturation,
hudTintBrightness: defaults.object(forKey: DefaultsKey.hudTintBrightness) as? Double
?? baseSettings.hudTintBrightness,
liquidGlassStyle: LiquidGlassStylePreference(
rawValue: defaults.string(forKey: DefaultsKey.liquidGlassStyle) ?? "")
?? baseSettings.liquidGlassStyle,
Expand Down Expand Up @@ -105,6 +111,8 @@ final class NativeHostSettingsStore {
defaults.set(settings.hudBlur, forKey: DefaultsKey.hudBlur)
defaults.set(settings.hudTint, forKey: DefaultsKey.hudTint)
defaults.set(settings.hudTintHue, forKey: DefaultsKey.hudTintHue)
defaults.set(settings.hudTintSaturation, forKey: DefaultsKey.hudTintSaturation)
defaults.set(settings.hudTintBrightness, forKey: DefaultsKey.hudTintBrightness)
defaults.set(settings.liquidGlassStyle.rawValue, forKey: DefaultsKey.liquidGlassStyle)
defaults.set(settings.loupeSampleSize.rawValue, forKey: DefaultsKey.loupeSampleSize)
}
Expand All @@ -124,6 +132,8 @@ struct NativeHostSettings: Equatable {
var hudBlur: Double
var hudTint: Double
var hudTintHue: Double
var hudTintSaturation: Double
var hudTintBrightness: Double
var liquidGlassStyle: LiquidGlassStylePreference
var loupeSampleSize: LoupeSampleSizePreference

Expand All @@ -143,6 +153,8 @@ struct NativeHostSettings: Equatable {
hudBlur: 0.5032628676470589,
hudTint: 0.4990234375,
hudTintHue: 0.6074879184861536,
hudTintSaturation: 0.72,
hudTintBrightness: 0.95,
liquidGlassStyle: .clear,
loupeSampleSize: .small
)
Expand All @@ -159,6 +171,8 @@ struct NativeHostSettings: Equatable {
copy.hudBlur = copy.hudBlur.clamped(to: 0...1)
copy.hudTint = copy.hudTint.clamped(to: 0...1)
copy.hudTintHue = copy.hudTintHue.clamped(to: 0...1)
copy.hudTintSaturation = copy.hudTintSaturation.clamped(to: 0...1)
copy.hudTintBrightness = copy.hudTintBrightness.clamped(to: 0...1)
return copy
}

Expand Down
Loading
Loading