Remember the Actual Size view choice

Persist the magnifier state in UserDefaults so every new result window
opens in the same mode and the choice survives relaunches.

Generated with OpenCode

Assisted-by: Kimi:k3
This commit is contained in:
2026-10-26 21:14:51 +08:00
parent d4b0970ed2
commit cac85402a3
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -120,7 +120,11 @@ final class CaptureModel: ObservableObject {
/// Whether the pen is active (drag draws instead of selecting)
@Published var tool: Tool = .select
/// Actual-size view: 1 image pixel per screen pixel, scrollable.
@Published var isActualSize = false
/// Persisted so the choice carries over to new windows and launches.
@Published var isActualSize: Bool = UserDefaults.standard.bool(forKey: CaptureModel.actualSizeKey) {
didSet { UserDefaults.standard.set(isActualSize, forKey: CaptureModel.actualSizeKey) }
}
private static let actualSizeKey = "actualSizeView"
/// Current drawing color
@Published var drawColor: NSColor = .systemRed
/// Stroke thickness in points (image space)
+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.11.2</string>
<string>1.11.3</string>
<key>CFBundleVersion</key>
<string>112</string>
<string>113</string>
<key>LSUIElement</key>
<true/>
<key>NSHighResolutionCapable</key>