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
8 changes: 8 additions & 0 deletions docs/spec/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ Defines:
applicability controls.
- Frame Preset must be a single control with Off and the available background presets. Off disables
the capture frame effect without requiring a separate Export Frame toggle.
- Frame Preset must render as a compact horizontal swatch selector. Off is represented by an empty
slash swatch, and background presets are represented by small background thumbnails without
visible option labels. Preset growth must preserve swatch size instead of shrinking cards to fit;
overflow must remain mouse-accessible through lightweight step controls, including click-and-hold
repeated movement for long preset lists.
- Wallpaper swatches must not synchronously decode full wallpaper files in Swift. Swift may discover
the current wallpaper path and present pixels, but bounded wallpaper thumbnail decoding and caching
are Rust-owned.
- Apply To must be disabled while Frame Preset is Off.
- Capture frame effects may apply to drag-region captures, window captures, or both. Fullscreen
captures are excluded from this setting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ package enum CaptureFrameEffectRenderer {
captureFramePlan(for: imageSize, screen: nil, source: .unknown)?.imageRect ?? .zero
}

package static func backgroundPlan(
for background: CaptureFrameBackgroundPreference
) -> CaptureFrameBackgroundPlan? {
try? RsnapCaptureFramePlanner.backgroundPlan(for: background.planKind)
}

package static func systemWallpaperPath(screen: NSScreen?) -> String? {
guard
let screen = screen ?? NSScreen.main,
let url = NSWorkspace.shared.desktopImageURL(for: screen)
else {
return nil
}

return url.standardizedFileURL.path
}

private static func renderWithRust(
image: CGImage,
background: CaptureFrameBackgroundPreference,
Expand Down Expand Up @@ -87,14 +104,7 @@ package enum CaptureFrameEffectRenderer {
guard background == .systemWallpaper else {
return nil
}
guard
let screen = screen ?? NSScreen.main,
let url = NSWorkspace.shared.desktopImageURL(for: screen)
else {
return nil
}

return url.standardizedFileURL.path
return systemWallpaperPath(screen: screen)
}

private static func captureFramePlan(
Expand Down
Loading
Loading