Skip to content

Commit 4af37e3

Browse files
D3OXYclaude
andcommitted
Release v1.3.2 - Dynamic aspect ratio and smart visibility
- Window matches screen's aspect ratio for optimal preview - Aspect ratio locked when resizing - Window hidden from external capture until sharing starts - Settings screen invisible to Google Meet/Zoom 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent df2172c commit 4af37e3

3 files changed

Lines changed: 36 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.3.2] - 2024-12-21
11+
12+
### Changed
13+
- **Dynamic aspect ratio**: Window now matches your screen's aspect ratio for optimal preview quality
14+
- **Locked aspect ratio**: Window maintains screen proportions when resizing
15+
- **Smart visibility**: Window is hidden from external screen capture until sharing starts
16+
- Settings screen won't appear in Google Meet/Zoom
17+
- Only the preview becomes visible after clicking "Start Sharing"
18+
1019
## [1.3.1] - 2024-12-21
1120

1221
### Fixed
@@ -89,6 +98,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8998

9099
| Version | Date | Highlights |
91100
|---------|------|------------|
101+
| 1.3.2 | 2024-12-21 | Dynamic aspect ratio, smart visibility (hidden until sharing) |
92102
| 1.3.1 | 2024-12-21 | Fix window sharing visibility, self-hide toggle |
93103
| 1.3.0 | 2024-12-21 | Live settings panel, conditional UI, modernized design |
94104
| 1.2.0 | 2024-12-21 | Real-time blur, blur intensity slider, liquid glass HUD |

Cloak/AppDelegate.swift

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,15 @@ class AppDelegate: NSObject, NSApplicationDelegate {
7575
}
7676

7777
func setupMainWindow() {
78-
let windowRect = NSRect(x: 100, y: 100, width: 1280, height: 720)
78+
// Match the screen's aspect ratio for best preview quality
79+
let screen = NSScreen.main ?? NSScreen.screens.first!
80+
let screenSize = screen.frame.size
81+
let aspectRatio = screenSize.width / screenSize.height
82+
83+
// Use 75% of screen height for good size, maintain aspect ratio
84+
let windowHeight: CGFloat = min(900, screenSize.height * 0.75)
85+
let windowWidth = windowHeight * aspectRatio
86+
let windowRect = NSRect(x: 0, y: 0, width: windowWidth, height: windowHeight)
7987

8088
window = NSWindow(
8189
contentRect: windowRect,
@@ -88,18 +96,23 @@ class AppDelegate: NSObject, NSApplicationDelegate {
8896
window.titlebarAppearsTransparent = true
8997
window.titleVisibility = .hidden
9098
window.isMovableByWindowBackground = true
91-
window.minSize = NSSize(width: 800, height: 500)
99+
window.minSize = NSSize(width: 640, height: 400)
92100
window.isReleasedWhenClosed = false
93101
window.collectionBehavior = [.fullScreenPrimary]
94-
// Note: Don't use sharingType = .none here - it would hide from Google Meet/Zoom too!
95-
// Instead, we exclude from our own capture via SCContentFilter
102+
window.aspectRatio = NSSize(width: aspectRatio, height: 1) // Lock aspect ratio
103+
104+
// Hide from external screen capture until sharing starts
105+
// This prevents Google Meet/Zoom from seeing the settings screen
106+
window.sharingType = .none
96107

97108
mainView = MainView(frame: windowRect)
98109
mainView.delegate = self
99110
mainView.settingsDelegate = self
100111
mainView.hotkeyManager = hotkeyManager
101112
window.contentView = mainView
102113

114+
// Center the window on screen
115+
window.center()
103116
window.makeKeyAndOrderFront(nil)
104117
}
105118

@@ -127,6 +140,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
127140
@objc func startCapture() {
128141
mainView.showCapturing()
129142

143+
// Make window visible to external screen capture (Google Meet, Zoom, etc.)
144+
window.sharingType = .readOnly
145+
130146
// Ensure HUD window exists so it can be excluded
131147
if hudWindow == nil {
132148
hudWindow = HUDWindow()
@@ -157,6 +173,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
157173
@objc func stopCapture() {
158174
captureEngine?.stopCapture()
159175
captureEngine = nil
176+
177+
// Hide window from external screen capture again
178+
window.sharingType = .none
179+
160180
mainView.showStartScreen()
161181
updateStatusBarIcon(isPrivate: false)
162182
}

Cloak/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleShortVersionString</key>
6-
<string>1.3.1</string>
6+
<string>1.3.2</string>
77
<key>CFBundleVersion</key>
8-
<string>5</string>
8+
<string>6</string>
99
<key>NSScreenCaptureUsageDescription</key>
1010
<string>Cloak needs to capture your screen to create a preview window that you can share.</string>
1111
</dict>

0 commit comments

Comments
 (0)