node-mac-recorder 2.6.15 → 2.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/window_selector.mm +10 -16
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -87,7 +87,7 @@ void updateScreenOverlays();
|
|
|
87
87
|
// No border to match screen selector
|
|
88
88
|
self.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
89
89
|
self.layer.borderWidth = 0.0;
|
|
90
|
-
self.layer.cornerRadius =
|
|
90
|
+
self.layer.cornerRadius = 8.0;
|
|
91
91
|
self.layer.masksToBounds = YES;
|
|
92
92
|
self.layer.shadowOpacity = 0.0;
|
|
93
93
|
self.layer.shadowRadius = 0.0;
|
|
@@ -119,7 +119,7 @@ void updateScreenOverlays();
|
|
|
119
119
|
self.layer.backgroundColor = [[NSColor clearColor] CGColor];
|
|
120
120
|
// Ensure no borders or decorations
|
|
121
121
|
self.layer.borderWidth = 0.0;
|
|
122
|
-
self.layer.cornerRadius =
|
|
122
|
+
self.layer.cornerRadius = 8.0;
|
|
123
123
|
self.layer.masksToBounds = YES;
|
|
124
124
|
self.layer.shadowOpacity = 0.0;
|
|
125
125
|
self.layer.shadowRadius = 0.0;
|
|
@@ -179,7 +179,7 @@ void updateScreenOverlays();
|
|
|
179
179
|
self.layer.backgroundColor = [[NSColor clearColor] CGColor];
|
|
180
180
|
// Ensure no borders or decorations
|
|
181
181
|
self.layer.borderWidth = 0.0;
|
|
182
|
-
self.layer.cornerRadius =
|
|
182
|
+
self.layer.cornerRadius = 8.0;
|
|
183
183
|
self.layer.masksToBounds = YES;
|
|
184
184
|
self.layer.shadowOpacity = 0.0;
|
|
185
185
|
self.layer.shadowRadius = 0.0;
|
|
@@ -681,14 +681,13 @@ void updateOverlay() {
|
|
|
681
681
|
[g_overlayWindow orderFront:nil];
|
|
682
682
|
[g_overlayWindow makeKeyAndOrderFront:nil];
|
|
683
683
|
|
|
684
|
-
// Ensure all subviews have no borders after positioning
|
|
684
|
+
// Ensure all subviews have no borders after positioning, but preserve corner radius for buttons and icons
|
|
685
685
|
for (NSView *subview in [g_overlayWindow.contentView subviews]) {
|
|
686
686
|
if ([subview respondsToSelector:@selector(setWantsLayer:)]) {
|
|
687
687
|
[subview setWantsLayer:YES];
|
|
688
688
|
if (subview.layer) {
|
|
689
689
|
subview.layer.borderWidth = 0.0;
|
|
690
690
|
subview.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
691
|
-
subview.layer.cornerRadius = 0.0;
|
|
692
691
|
subview.layer.masksToBounds = YES;
|
|
693
692
|
subview.layer.shadowOpacity = 0.0;
|
|
694
693
|
subview.layer.shadowRadius = 0.0;
|
|
@@ -1086,9 +1085,7 @@ bool startScreenSelection() {
|
|
|
1086
1085
|
[overlayView setScreenInfo:screenInfo];
|
|
1087
1086
|
[overlayWindow setContentView:overlayView];
|
|
1088
1087
|
|
|
1089
|
-
//
|
|
1090
|
-
[overlayWindow setWantsLayer:YES];
|
|
1091
|
-
// Note: NSWindow doesn't have direct layer access, only contentView does
|
|
1088
|
+
// Note: NSWindow doesn't have setWantsLayer method, only NSView does
|
|
1092
1089
|
|
|
1093
1090
|
// Create select button with more padding
|
|
1094
1091
|
NSButton *selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
|
|
@@ -1367,6 +1364,8 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
|
|
|
1367
1364
|
[overlayWindow setIgnoresMouseEvents:YES];
|
|
1368
1365
|
[overlayWindow setAcceptsMouseMovedEvents:NO];
|
|
1369
1366
|
[overlayWindow setHasShadow:NO];
|
|
1367
|
+
// no border
|
|
1368
|
+
[overlayWindow setStyleMask:NSWindowStyleMaskBorderless];
|
|
1370
1369
|
[overlayWindow setAlphaValue:1.0];
|
|
1371
1370
|
[overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces];
|
|
1372
1371
|
|
|
@@ -1384,9 +1383,7 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
|
|
|
1384
1383
|
[overlayWindow orderFront:nil];
|
|
1385
1384
|
[overlayWindow makeKeyAndOrderFront:nil];
|
|
1386
1385
|
|
|
1387
|
-
//
|
|
1388
|
-
[overlayWindow setWantsLayer:YES];
|
|
1389
|
-
// Note: NSWindow doesn't have direct layer access, only contentView does
|
|
1386
|
+
// Note: NSWindow doesn't have setWantsLayer method, only NSView does
|
|
1390
1387
|
|
|
1391
1388
|
// Store for cleanup (reuse recording preview window variable)
|
|
1392
1389
|
if (!g_recordingPreviewWindow) {
|
|
@@ -1460,9 +1457,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
|
|
|
1460
1457
|
g_overlayView = [[WindowSelectorOverlayView alloc] initWithFrame:initialFrame];
|
|
1461
1458
|
[g_overlayWindow setContentView:g_overlayView];
|
|
1462
1459
|
|
|
1463
|
-
//
|
|
1464
|
-
[g_overlayWindow setWantsLayer:YES];
|
|
1465
|
-
// Note: NSWindow doesn't have direct layer access, only contentView does
|
|
1460
|
+
// Note: NSWindow doesn't have setWantsLayer method, only NSView does
|
|
1466
1461
|
|
|
1467
1462
|
// Force content view to have no borders
|
|
1468
1463
|
g_overlayWindow.contentView.wantsLayer = YES;
|
|
@@ -1555,14 +1550,13 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
|
|
|
1555
1550
|
// Add cancel button to window
|
|
1556
1551
|
[g_overlayWindow.contentView addSubview:cancelButton];
|
|
1557
1552
|
|
|
1558
|
-
// Force all subviews to have no borders
|
|
1553
|
+
// Force all subviews to have no borders, but preserve corner radius for buttons and icons
|
|
1559
1554
|
for (NSView *subview in [g_overlayWindow.contentView subviews]) {
|
|
1560
1555
|
if ([subview respondsToSelector:@selector(setWantsLayer:)]) {
|
|
1561
1556
|
[subview setWantsLayer:YES];
|
|
1562
1557
|
if (subview.layer) {
|
|
1563
1558
|
subview.layer.borderWidth = 0.0;
|
|
1564
1559
|
subview.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
1565
|
-
subview.layer.cornerRadius = 0.0;
|
|
1566
1560
|
subview.layer.masksToBounds = YES;
|
|
1567
1561
|
subview.layer.shadowOpacity = 0.0;
|
|
1568
1562
|
subview.layer.shadowRadius = 0.0;
|