node-mac-recorder 2.10.31 → 2.10.32
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 +17 -15
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -326,7 +326,8 @@ void updateScreenOverlays();
|
|
|
326
326
|
self = [super initWithFrame:frameRect];
|
|
327
327
|
if (self) {
|
|
328
328
|
self.wantsLayer = YES;
|
|
329
|
-
|
|
329
|
+
// Semi-transparent purple background for screen/window overlay
|
|
330
|
+
self.layer.backgroundColor = [[NSColor colorWithRed:0.27 green:0.0 blue:0.77 alpha:0.18] CGColor];
|
|
330
331
|
// Ensure no borders or decorations
|
|
331
332
|
self.layer.borderWidth = 1.0;
|
|
332
333
|
self.layer.cornerRadius = 8.0;
|
|
@@ -386,7 +387,8 @@ void updateScreenOverlays();
|
|
|
386
387
|
self = [super initWithFrame:frameRect];
|
|
387
388
|
if (self) {
|
|
388
389
|
self.wantsLayer = YES;
|
|
389
|
-
|
|
390
|
+
// Semi-transparent purple background for screen/window overlay
|
|
391
|
+
self.layer.backgroundColor = [[NSColor colorWithRed:0.27 green:0.0 blue:0.77 alpha:0.18] CGColor];
|
|
390
392
|
// Ensure no borders or decorations
|
|
391
393
|
self.layer.borderWidth = 1.0;
|
|
392
394
|
self.layer.cornerRadius = 8.0;
|
|
@@ -936,14 +938,14 @@ void updateOverlay() {
|
|
|
936
938
|
NSRect overlayFrame = [g_overlayView frame]; // Use overlay view frame for proper centering
|
|
937
939
|
NSPoint buttonCenter = NSMakePoint(
|
|
938
940
|
(overlayFrame.size.width - buttonSize.width) / 2,
|
|
939
|
-
(overlayFrame.size.height - buttonSize.height) / 2
|
|
941
|
+
(overlayFrame.size.height - buttonSize.height) / 2 // Perfect center
|
|
940
942
|
);
|
|
941
943
|
[g_selectButton setFrameOrigin:buttonCenter];
|
|
942
944
|
|
|
943
|
-
// Position app icon above
|
|
945
|
+
// Position app icon above center
|
|
944
946
|
NSPoint iconCenter = NSMakePoint(
|
|
945
947
|
(overlayFrame.size.width - 96) / 2, // Center horizontally on overlay
|
|
946
|
-
|
|
948
|
+
(overlayFrame.size.height / 2) + 80 // 80px above center
|
|
947
949
|
);
|
|
948
950
|
[appIconView setFrameOrigin:iconCenter];
|
|
949
951
|
NSLog(@"🎯 Positioning app icon at: (%.0f, %.0f) for window size: (%.0f, %.0f)",
|
|
@@ -963,10 +965,10 @@ void updateOverlay() {
|
|
|
963
965
|
floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
|
964
966
|
[appIconView.layer addAnimation:floatAnimationX forKey:@"floatAnimationX"];
|
|
965
967
|
|
|
966
|
-
// Position info label
|
|
968
|
+
// Position info label between icon and button
|
|
967
969
|
NSPoint labelCenter = NSMakePoint(
|
|
968
970
|
(overlayFrame.size.width - [infoLabel frame].size.width) / 2, // Center horizontally on overlay
|
|
969
|
-
|
|
971
|
+
(overlayFrame.size.height / 2) + 30 // 30px above center, below icon
|
|
970
972
|
);
|
|
971
973
|
[infoLabel setFrameOrigin:labelCenter];
|
|
972
974
|
|
|
@@ -984,7 +986,7 @@ void updateOverlay() {
|
|
|
984
986
|
NSSize cancelButtonSize = [cancelButton frame].size;
|
|
985
987
|
NSPoint cancelButtonCenter = NSMakePoint(
|
|
986
988
|
(overlayFrame.size.width - cancelButtonSize.width) / 2, // Center horizontally on overlay
|
|
987
|
-
|
|
989
|
+
(overlayFrame.size.height / 2) - 60 // 60px below center
|
|
988
990
|
);
|
|
989
991
|
[cancelButton setFrameOrigin:cancelButtonCenter];
|
|
990
992
|
}
|
|
@@ -1512,17 +1514,17 @@ bool startScreenSelection() {
|
|
|
1512
1514
|
NSString *resolution = [screenInfo objectForKey:@"resolution"] ?: @"Unknown Resolution";
|
|
1513
1515
|
[screenInfoLabel setStringValue:[NSString stringWithFormat:@"%@\n%@", screenName, resolution]];
|
|
1514
1516
|
|
|
1515
|
-
// Position buttons - Start Record in center
|
|
1517
|
+
// Position buttons - Start Record in perfect center
|
|
1516
1518
|
NSPoint buttonCenter = NSMakePoint(
|
|
1517
1519
|
(screenFrame.size.width - [selectButton frame].size.width) / 2,
|
|
1518
|
-
(screenFrame.size.height - [selectButton frame].size.height) / 2
|
|
1520
|
+
(screenFrame.size.height - [selectButton frame].size.height) / 2 // Perfect center
|
|
1519
1521
|
);
|
|
1520
1522
|
[selectButton setFrameOrigin:buttonCenter];
|
|
1521
1523
|
|
|
1522
|
-
// Position screen icon above
|
|
1524
|
+
// Position screen icon above center
|
|
1523
1525
|
NSPoint iconCenter = NSMakePoint(
|
|
1524
1526
|
(screenFrame.size.width - 96) / 2, // Center horizontally (icon is 96px wide)
|
|
1525
|
-
|
|
1527
|
+
(screenFrame.size.height / 2) + 80 // 80px above center
|
|
1526
1528
|
);
|
|
1527
1529
|
[screenIconView setFrameOrigin:iconCenter];
|
|
1528
1530
|
|
|
@@ -1536,16 +1538,16 @@ bool startScreenSelection() {
|
|
|
1536
1538
|
screenFloatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
|
1537
1539
|
[screenIconView.layer addAnimation:screenFloatAnimationX forKey:@"floatAnimationX"];
|
|
1538
1540
|
|
|
1539
|
-
// Position info label
|
|
1541
|
+
// Position info label between icon and button
|
|
1540
1542
|
NSPoint labelCenter = NSMakePoint(
|
|
1541
1543
|
(screenFrame.size.width - [screenInfoLabel frame].size.width) / 2, // Center horizontally
|
|
1542
|
-
|
|
1544
|
+
(screenFrame.size.height / 2) + 30 // 30px above center, below icon
|
|
1543
1545
|
);
|
|
1544
1546
|
[screenInfoLabel setFrameOrigin:labelCenter];
|
|
1545
1547
|
|
|
1546
1548
|
NSPoint cancelButtonCenter = NSMakePoint(
|
|
1547
1549
|
(screenFrame.size.width - [screenCancelButton frame].size.width) / 2,
|
|
1548
|
-
|
|
1550
|
+
(screenFrame.size.height / 2) - 60 // 60px below center
|
|
1549
1551
|
);
|
|
1550
1552
|
[screenCancelButton setFrameOrigin:cancelButtonCenter];
|
|
1551
1553
|
|