node-mac-recorder 2.10.31 → 2.10.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.10.31",
3
+ "version": "2.10.33",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -326,7 +326,8 @@ void updateScreenOverlays();
326
326
  self = [super initWithFrame:frameRect];
327
327
  if (self) {
328
328
  self.wantsLayer = YES;
329
- self.layer.backgroundColor = [[NSColor clearColor] CGColor];
329
+ // Semi-transparent black background for screen overlay (same as window overlay)
330
+ self.layer.backgroundColor = [[NSColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.3] 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
- self.layer.backgroundColor = [[NSColor clearColor] CGColor];
390
+ // Semi-transparent black background for screen overlay (same as window overlay)
391
+ self.layer.backgroundColor = [[NSColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.3] 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 + 30 // Slightly above center
941
+ (overlayFrame.size.height - buttonSize.height) / 2 // Perfect center
940
942
  );
941
943
  [g_selectButton setFrameOrigin:buttonCenter];
942
944
 
943
- // Position app icon above text label in absolute overlay center
945
+ // Position app icon above center
944
946
  NSPoint iconCenter = NSMakePoint(
945
947
  (overlayFrame.size.width - 96) / 2, // Center horizontally on overlay
946
- buttonCenter.y + buttonSize.height + 60 + 10 // Above label + text height + margin
948
+ (overlayFrame.size.height / 2) + 120 // 120px 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 in absolute overlay center, above button
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
- buttonCenter.y + buttonSize.height + 10 // 10px above button, below icon
971
+ (overlayFrame.size.height / 2) + 50 // 50px 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
- buttonCenter.y - buttonSize.height - 20 // 20px below main button
989
+ (overlayFrame.size.height / 2) - 80 // 80px 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, Cancel below it
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 + 15 // Slightly above center
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 text label
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
- buttonCenter.y + [selectButton frame].size.height + 60 + 10 // Above label + text height + margin
1527
+ (screenFrame.size.height / 2) + 120 // 120px 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 at screen center, above button
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
- buttonCenter.y + [selectButton frame].size.height + 10 // 10px above button, below icon
1544
+ (screenFrame.size.height / 2) + 50 // 50px 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
- buttonCenter.y - [selectButton frame].size.height - 20 // 20px below main button
1550
+ (screenFrame.size.height / 2) - 80 // 80px below center
1549
1551
  );
1550
1552
  [screenCancelButton setFrameOrigin:cancelButtonCenter];
1551
1553