node-mac-recorder 2.6.16 → 2.6.18
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 +18 -9
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;
|
|
@@ -1365,9 +1364,19 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
|
|
|
1365
1364
|
[overlayWindow setIgnoresMouseEvents:YES];
|
|
1366
1365
|
[overlayWindow setAcceptsMouseMovedEvents:NO];
|
|
1367
1366
|
[overlayWindow setHasShadow:NO];
|
|
1367
|
+
// no border
|
|
1368
|
+
[overlayWindow setStyleMask:NSWindowStyleMaskBorderless];
|
|
1368
1369
|
[overlayWindow setAlphaValue:1.0];
|
|
1369
1370
|
[overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces];
|
|
1370
1371
|
|
|
1372
|
+
|
|
1373
|
+
// Force content view to have no borders
|
|
1374
|
+
overlayWindow.contentView.wantsLayer = YES;
|
|
1375
|
+
overlayWindow.contentView.layer.borderWidth = 0.0;
|
|
1376
|
+
overlayWindow.contentView.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
1377
|
+
overlayWindow.contentView.layer.cornerRadius = 0.0;
|
|
1378
|
+
overlayWindow.contentView.layer.masksToBounds = YES;
|
|
1379
|
+
|
|
1371
1380
|
// Remove any default window decorations and borders
|
|
1372
1381
|
[overlayWindow setTitlebarAppearsTransparent:YES];
|
|
1373
1382
|
[overlayWindow setTitleVisibility:NSWindowTitleHidden];
|
|
@@ -1377,8 +1386,9 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
|
|
|
1377
1386
|
// Force remove all borders and decorations
|
|
1378
1387
|
[overlayWindow setHasShadow:NO];
|
|
1379
1388
|
[overlayWindow setOpaque:NO];
|
|
1380
|
-
[overlayWindow setBackgroundColor:[NSColor
|
|
1381
|
-
|
|
1389
|
+
[overlayWindow setBackgroundColor:[NSColor clearColor]];
|
|
1390
|
+
|
|
1391
|
+
|
|
1382
1392
|
[overlayWindow orderFront:nil];
|
|
1383
1393
|
[overlayWindow makeKeyAndOrderFront:nil];
|
|
1384
1394
|
|
|
@@ -1549,14 +1559,13 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
|
|
|
1549
1559
|
// Add cancel button to window
|
|
1550
1560
|
[g_overlayWindow.contentView addSubview:cancelButton];
|
|
1551
1561
|
|
|
1552
|
-
// Force all subviews to have no borders
|
|
1562
|
+
// Force all subviews to have no borders, but preserve corner radius for buttons and icons
|
|
1553
1563
|
for (NSView *subview in [g_overlayWindow.contentView subviews]) {
|
|
1554
1564
|
if ([subview respondsToSelector:@selector(setWantsLayer:)]) {
|
|
1555
1565
|
[subview setWantsLayer:YES];
|
|
1556
1566
|
if (subview.layer) {
|
|
1557
1567
|
subview.layer.borderWidth = 0.0;
|
|
1558
1568
|
subview.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
1559
|
-
subview.layer.cornerRadius = 0.0;
|
|
1560
1569
|
subview.layer.masksToBounds = YES;
|
|
1561
1570
|
subview.layer.shadowOpacity = 0.0;
|
|
1562
1571
|
subview.layer.shadowRadius = 0.0;
|