node-mac-recorder 2.5.0 → 2.5.2

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.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -57,10 +57,7 @@ bool hideScreenRecordingPreview();
57
57
  self = [super initWithFrame:frameRect];
58
58
  if (self) {
59
59
  self.wantsLayer = YES;
60
- self.layer.backgroundColor = [[NSColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:0.45] CGColor];
61
- self.layer.borderColor = [[NSColor colorWithRed:0.0 green:0.4 blue:0.8 alpha:0.9] CGColor];
62
- self.layer.borderWidth = 5.0;
63
- self.layer.cornerRadius = 8.0;
60
+ self.layer.backgroundColor = [[NSColor clearColor] CGColor];
64
61
  }
65
62
  return self;
66
63
  }
@@ -70,34 +67,17 @@ bool hideScreenRecordingPreview();
70
67
 
71
68
  if (!self.windowInfo) return;
72
69
 
73
- // Background with transparency
74
- [[NSColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:0.45] setFill];
75
- NSRectFill(dirtyRect);
70
+ // Background with transparency - purple tone
71
+ [[NSColor colorWithRed:0.4 green:0.3 blue:0.8 alpha:0.08] setFill];
72
+ NSRectFill(self.bounds);
76
73
 
77
- // Border
78
- [[NSColor colorWithRed:0.0 green:0.4 blue:0.8 alpha:0.9] setStroke];
79
- NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:self.bounds xRadius:8 yRadius:8];
80
- [border setLineWidth:3.0];
74
+ // Thin border with darker purple
75
+ [[NSColor colorWithRed:0.3 green:0.2 blue:0.6 alpha:0.6] setStroke];
76
+ NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds, 0.5, 0.5) xRadius:12 yRadius:12];
77
+ [border setLineWidth:1.0];
81
78
  [border stroke];
82
79
 
83
- // Window info text
84
- NSString *windowTitle = [self.windowInfo objectForKey:@"title"] ?: @"Unknown Window";
85
- NSString *appName = [self.windowInfo objectForKey:@"appName"] ?: @"Unknown App";
86
- NSString *infoText = [NSString stringWithFormat:@"%@\n%@", appName, windowTitle];
87
-
88
- NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
89
- [style setAlignment:NSTextAlignmentCenter];
90
-
91
- NSDictionary *attributes = @{
92
- NSFontAttributeName: [NSFont systemFontOfSize:21 weight:NSFontWeightMedium],
93
- NSForegroundColorAttributeName: [NSColor whiteColor],
94
- NSParagraphStyleAttributeName: style,
95
- NSStrokeColorAttributeName: [NSColor blackColor],
96
- NSStrokeWidthAttributeName: @(-2.0)
97
- };
98
-
99
- NSRect textRect = NSMakeRect(10, self.bounds.size.height - 90, self.bounds.size.width - 20, 80);
100
- [infoText drawInRect:textRect withAttributes:attributes];
80
+ // Text will be handled by separate label above button
101
81
  }
102
82
 
103
83
  @end
@@ -165,10 +145,7 @@ bool hideScreenRecordingPreview();
165
145
  self = [super initWithFrame:frameRect];
166
146
  if (self) {
167
147
  self.wantsLayer = YES;
168
- self.layer.backgroundColor = [[NSColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:0.45] CGColor];
169
- self.layer.borderColor = [[NSColor colorWithRed:0.0 green:0.4 blue:0.8 alpha:0.9] CGColor];
170
- self.layer.borderWidth = 5.0;
171
- self.layer.cornerRadius = 8.0;
148
+ self.layer.backgroundColor = [[NSColor clearColor] CGColor];
172
149
  }
173
150
  return self;
174
151
  }
@@ -178,34 +155,17 @@ bool hideScreenRecordingPreview();
178
155
 
179
156
  if (!self.screenInfo) return;
180
157
 
181
- // Background with transparency
182
- [[NSColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:0.45] setFill];
183
- NSRectFill(dirtyRect);
158
+ // Background with transparency - purple tone
159
+ [[NSColor colorWithRed:0.4 green:0.3 blue:0.8 alpha:0.12] setFill];
160
+ NSRectFill(self.bounds);
184
161
 
185
- // Border
186
- [[NSColor colorWithRed:0.0 green:0.4 blue:0.8 alpha:0.9] setStroke];
187
- NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:self.bounds xRadius:8 yRadius:8];
188
- [border setLineWidth:3.0];
162
+ // Thin border with darker purple
163
+ [[NSColor colorWithRed:0.3 green:0.2 blue:0.6 alpha:0.5] setStroke];
164
+ NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds, 0.5, 0.5) xRadius:15 yRadius:15];
165
+ [border setLineWidth:1.0];
189
166
  [border stroke];
190
167
 
191
- // Screen info text
192
- NSString *screenName = [self.screenInfo objectForKey:@"name"] ?: @"Unknown Screen";
193
- NSString *resolution = [self.screenInfo objectForKey:@"resolution"] ?: @"Unknown Resolution";
194
- NSString *infoText = [NSString stringWithFormat:@"%@\n%@", screenName, resolution];
195
-
196
- NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
197
- [style setAlignment:NSTextAlignmentCenter];
198
-
199
- NSDictionary *attributes = @{
200
- NSFontAttributeName: [NSFont systemFontOfSize:21 weight:NSFontWeightMedium],
201
- NSForegroundColorAttributeName: [NSColor whiteColor],
202
- NSParagraphStyleAttributeName: style,
203
- NSStrokeColorAttributeName: [NSColor blackColor],
204
- NSStrokeWidthAttributeName: @(-2.0)
205
- };
206
-
207
- NSRect textRect = NSMakeRect(10, self.bounds.size.height - 90, self.bounds.size.width - 20, 80);
208
- [infoText drawInRect:textRect withAttributes:attributes];
168
+ // Text will be handled by separate label above button
209
169
  }
210
170
 
211
171
  @end
@@ -526,15 +486,94 @@ void updateOverlay() {
526
486
  [(WindowSelectorOverlayView *)g_overlayView setWindowInfo:windowUnderCursor];
527
487
  [g_overlayView setNeedsDisplay:YES];
528
488
 
489
+ // Add/update info label above button
490
+ NSTextField *infoLabel = nil;
491
+ for (NSView *subview in [g_overlayWindow.contentView subviews]) {
492
+ if ([subview isKindOfClass:[NSTextField class]]) {
493
+ infoLabel = (NSTextField*)subview;
494
+ break;
495
+ }
496
+ }
497
+
498
+ if (!infoLabel) {
499
+ infoLabel = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, width - 40, 60)];
500
+ [infoLabel setEditable:NO];
501
+ [infoLabel setSelectable:NO];
502
+ [infoLabel setBezeled:NO];
503
+ [infoLabel setDrawsBackground:NO];
504
+ [infoLabel setAlignment:NSTextAlignmentCenter];
505
+ [infoLabel setFont:[NSFont systemFontOfSize:18 weight:NSFontWeightMedium]];
506
+ [infoLabel setTextColor:[NSColor whiteColor]];
507
+
508
+ [g_overlayWindow.contentView addSubview:infoLabel];
509
+ }
510
+
511
+ // Add/update app icon
512
+ NSImageView *appIconView = nil;
513
+ for (NSView *subview in [g_overlayWindow.contentView subviews]) {
514
+ if ([subview isKindOfClass:[NSImageView class]]) {
515
+ appIconView = (NSImageView*)subview;
516
+ break;
517
+ }
518
+ }
519
+
520
+ if (!appIconView) {
521
+ appIconView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 96, 96)];
522
+ [appIconView setImageScaling:NSImageScaleProportionallyUpOrDown];
523
+ [appIconView setWantsLayer:YES];
524
+ [appIconView.layer setCornerRadius:16.0]; // Rounded corners like iOS
525
+ [appIconView.layer setMasksToBounds:YES];
526
+ [g_overlayWindow.contentView addSubview:appIconView];
527
+ }
528
+
529
+ // Get app icon using NSWorkspace
530
+ NSString *iconAppName = [windowUnderCursor objectForKey:@"appName"] ?: @"Unknown";
531
+ NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
532
+ NSArray *runningApps = [workspace runningApplications];
533
+ NSImage *appIcon = nil;
534
+
535
+ for (NSRunningApplication *app in runningApps) {
536
+ if ([[app localizedName] isEqualToString:iconAppName] || [[app bundleIdentifier] containsString:iconAppName]) {
537
+ appIcon = [app icon];
538
+ break;
539
+ }
540
+ }
541
+
542
+ // Fallback to generic app icon if not found
543
+ if (!appIcon) {
544
+ appIcon = [workspace iconForFileType:NSFileTypeForHFSTypeCode(kGenericApplicationIcon)];
545
+ }
546
+
547
+ [appIconView setImage:appIcon];
548
+
549
+ // Update label text
550
+ NSString *labelWindowTitle = [windowUnderCursor objectForKey:@"title"] ?: @"Unknown Window";
551
+ NSString *labelAppName = [windowUnderCursor objectForKey:@"appName"] ?: @"Unknown App";
552
+ [infoLabel setStringValue:[NSString stringWithFormat:@"%@\n%@", labelAppName, labelWindowTitle]];
553
+
529
554
  // Position buttons - Start Record in center, Cancel below it
530
555
  if (g_selectButton) {
531
556
  NSSize buttonSize = [g_selectButton frame].size;
532
557
  NSPoint buttonCenter = NSMakePoint(
533
558
  (width - buttonSize.width) / 2,
534
- (height - buttonSize.height) / 2 + 30 // Slightly above center
559
+ (height - buttonSize.height) / 2 + 15 // Slightly above center
535
560
  );
536
561
  [g_selectButton setFrameOrigin:buttonCenter];
537
562
 
563
+ // Position app icon above text label
564
+ NSPoint iconCenter = NSMakePoint(
565
+ (width - 96) / 2, // Center horizontally (icon is 96px wide)
566
+ buttonCenter.y + buttonSize.height + 60 + 10 // Above label + text height + margin
567
+ );
568
+ [appIconView setFrameOrigin:iconCenter];
569
+
570
+ // Position info label at overlay center, above button
571
+ NSPoint labelCenter = NSMakePoint(
572
+ (width - [infoLabel frame].size.width) / 2, // Center horizontally
573
+ buttonCenter.y + buttonSize.height + 10 // 10px above button, below icon
574
+ );
575
+ [infoLabel setFrameOrigin:labelCenter];
576
+
538
577
  // Position cancel button below the main button
539
578
  NSButton *cancelButton = nil;
540
579
  for (NSView *subview in [g_overlayWindow.contentView subviews]) {
@@ -780,13 +819,14 @@ bool startScreenSelection() {
780
819
  [selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightSemibold]];
781
820
  [selectButton setTag:i]; // Set screen index as tag
782
821
 
783
- // Blue background with white text
822
+ // Modern button styling with gradient-like effect
784
823
  [selectButton setWantsLayer:YES];
785
- [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.6 blue:1.0 alpha:0.95] CGColor]];
786
- [selectButton.layer setCornerRadius:12.0];
824
+ [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.1 green:0.5 blue:0.9 alpha:0.95] CGColor]];
825
+ [selectButton.layer setCornerRadius:14.0];
787
826
  [selectButton.layer setBorderWidth:0.0];
788
827
 
789
- // White text color
828
+ // White text color with better font weight
829
+ [selectButton setFont:[NSFont systemFontOfSize:17 weight:NSFontWeightSemibold]];
790
830
  NSMutableAttributedString *titleString = [[NSMutableAttributedString alloc]
791
831
  initWithString:[selectButton title]];
792
832
  [titleString addAttribute:NSForegroundColorAttributeName
@@ -794,11 +834,19 @@ bool startScreenSelection() {
794
834
  range:NSMakeRange(0, [titleString length])];
795
835
  [selectButton setAttributedTitle:titleString];
796
836
 
797
- // Add shadow for better visibility
798
- [selectButton.layer setShadowColor:[[NSColor blackColor] CGColor]];
799
- [selectButton.layer setShadowOffset:NSMakeSize(0, -2)];
800
- [selectButton.layer setShadowRadius:4.0];
801
- [selectButton.layer setShadowOpacity:0.3];
837
+ // Enhanced shadow for modern look
838
+ [selectButton.layer setShadowColor:[[NSColor colorWithRed:0.0 green:0.3 blue:0.7 alpha:0.8] CGColor]];
839
+ [selectButton.layer setShadowOffset:NSMakeSize(0, -3)];
840
+ [selectButton.layer setShadowRadius:8.0];
841
+ [selectButton.layer setShadowOpacity:0.4];
842
+
843
+ // Add subtle inner highlight
844
+ CALayer *highlightLayer = [CALayer layer];
845
+ [highlightLayer setFrame:CGRectMake(0, selectButton.frame.size.height * 0.6,
846
+ selectButton.frame.size.width, selectButton.frame.size.height * 0.4)];
847
+ [highlightLayer setBackgroundColor:[[NSColor colorWithRed:0.3 green:0.7 blue:1.0 alpha:0.3] CGColor]];
848
+ [highlightLayer setCornerRadius:14.0];
849
+ [selectButton.layer addSublayer:highlightLayer];
802
850
 
803
851
  // Set button target and action (reuse global delegate)
804
852
  if (!g_delegate) {
@@ -814,13 +862,14 @@ bool startScreenSelection() {
814
862
  [screenCancelButton setBezelStyle:NSBezelStyleRegularSquare];
815
863
  [screenCancelButton setFont:[NSFont systemFontOfSize:14 weight:NSFontWeightMedium]];
816
864
 
817
- // Gray cancel button styling
865
+ // Modern cancel button styling
818
866
  [screenCancelButton setWantsLayer:YES];
819
- [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:0.9] CGColor]];
820
- [screenCancelButton.layer setCornerRadius:10.0];
867
+ [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:0.9] CGColor]];
868
+ [screenCancelButton.layer setCornerRadius:12.0];
821
869
  [screenCancelButton.layer setBorderWidth:0.0];
822
870
 
823
- // White text for cancel button
871
+ // White text for cancel button with better font
872
+ [screenCancelButton setFont:[NSFont systemFontOfSize:15 weight:NSFontWeightMedium]];
824
873
  NSMutableAttributedString *screenCancelTitleString = [[NSMutableAttributedString alloc]
825
874
  initWithString:[screenCancelButton title]];
826
875
  [screenCancelTitleString addAttribute:NSForegroundColorAttributeName
@@ -828,28 +877,71 @@ bool startScreenSelection() {
828
877
  range:NSMakeRange(0, [screenCancelTitleString length])];
829
878
  [screenCancelButton setAttributedTitle:screenCancelTitleString];
830
879
 
831
- // Add shadow for cancel button
832
- [screenCancelButton.layer setShadowColor:[[NSColor blackColor] CGColor]];
833
- [screenCancelButton.layer setShadowOffset:NSMakeSize(0, -1)];
834
- [screenCancelButton.layer setShadowRadius:2.0];
835
- [screenCancelButton.layer setShadowOpacity:0.2];
880
+ // Enhanced shadow for cancel button
881
+ [screenCancelButton.layer setShadowColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.8] CGColor]];
882
+ [screenCancelButton.layer setShadowOffset:NSMakeSize(0, -2)];
883
+ [screenCancelButton.layer setShadowRadius:4.0];
884
+ [screenCancelButton.layer setShadowOpacity:0.3];
836
885
 
837
886
  [screenCancelButton setTarget:g_delegate];
838
887
  [screenCancelButton setAction:@selector(cancelButtonClicked:)];
839
888
 
889
+ // Create info label for screen
890
+ NSTextField *screenInfoLabel = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, screenFrame.size.width - 40, 60)];
891
+ [screenInfoLabel setEditable:NO];
892
+ [screenInfoLabel setSelectable:NO];
893
+ [screenInfoLabel setBezeled:NO];
894
+ [screenInfoLabel setDrawsBackground:NO];
895
+ [screenInfoLabel setAlignment:NSTextAlignmentCenter];
896
+ [screenInfoLabel setFont:[NSFont systemFontOfSize:20 weight:NSFontWeightMedium]];
897
+ [screenInfoLabel setTextColor:[NSColor whiteColor]];
898
+
899
+ // Create screen icon (display icon)
900
+ NSImageView *screenIconView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 96, 96)];
901
+ [screenIconView setImageScaling:NSImageScaleProportionallyUpOrDown];
902
+ [screenIconView setWantsLayer:YES];
903
+ [screenIconView.layer setCornerRadius:16.0];
904
+ [screenIconView.layer setMasksToBounds:YES];
905
+
906
+ // Set display icon
907
+ NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
908
+ NSImage *displayIcon = [workspace iconForFileType:NSFileTypeForHFSTypeCode(kComputerIcon)];
909
+ [screenIconView setImage:displayIcon];
910
+
911
+ // Set screen info text
912
+ NSString *screenName = [screenInfo objectForKey:@"name"] ?: @"Unknown Screen";
913
+ NSString *resolution = [screenInfo objectForKey:@"resolution"] ?: @"Unknown Resolution";
914
+ [screenInfoLabel setStringValue:[NSString stringWithFormat:@"%@\n%@", screenName, resolution]];
915
+
840
916
  // Position buttons - Start Record in center, Cancel below it
841
917
  NSPoint buttonCenter = NSMakePoint(
842
918
  (screenFrame.size.width - [selectButton frame].size.width) / 2,
843
- (screenFrame.size.height - [selectButton frame].size.height) / 2 + 30 // Slightly above center
919
+ (screenFrame.size.height - [selectButton frame].size.height) / 2 + 15 // Slightly above center
844
920
  );
845
921
  [selectButton setFrameOrigin:buttonCenter];
846
922
 
923
+ // Position screen icon above text label
924
+ NSPoint iconCenter = NSMakePoint(
925
+ (screenFrame.size.width - 96) / 2, // Center horizontally (icon is 96px wide)
926
+ buttonCenter.y + [selectButton frame].size.height + 60 + 10 // Above label + text height + margin
927
+ );
928
+ [screenIconView setFrameOrigin:iconCenter];
929
+
930
+ // Position info label at screen center, above button
931
+ NSPoint labelCenter = NSMakePoint(
932
+ (screenFrame.size.width - [screenInfoLabel frame].size.width) / 2, // Center horizontally
933
+ buttonCenter.y + [selectButton frame].size.height + 10 // 10px above button, below icon
934
+ );
935
+ [screenInfoLabel setFrameOrigin:labelCenter];
936
+
847
937
  NSPoint cancelButtonCenter = NSMakePoint(
848
938
  (screenFrame.size.width - [screenCancelButton frame].size.width) / 2,
849
939
  buttonCenter.y - [selectButton frame].size.height - 20 // 20px below main button
850
940
  );
851
941
  [screenCancelButton setFrameOrigin:cancelButtonCenter];
852
942
 
943
+ [overlayView addSubview:screenIconView];
944
+ [overlayView addSubview:screenInfoLabel];
853
945
  [overlayView addSubview:selectButton];
854
946
  [overlayView addSubview:screenCancelButton];
855
947
  [overlayWindow orderFront:nil];
@@ -1012,13 +1104,14 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1012
1104
  [g_selectButton setBezelStyle:NSBezelStyleRegularSquare];
1013
1105
  [g_selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightSemibold]];
1014
1106
 
1015
- // Blue background with white text
1107
+ // Modern button styling with gradient-like effect
1016
1108
  [g_selectButton setWantsLayer:YES];
1017
- [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.6 blue:1.0 alpha:0.95] CGColor]];
1018
- [g_selectButton.layer setCornerRadius:12.0];
1109
+ [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.1 green:0.5 blue:0.9 alpha:0.95] CGColor]];
1110
+ [g_selectButton.layer setCornerRadius:14.0];
1019
1111
  [g_selectButton.layer setBorderWidth:0.0];
1020
1112
 
1021
- // White text color
1113
+ // White text color with better font weight
1114
+ [g_selectButton setFont:[NSFont systemFontOfSize:17 weight:NSFontWeightSemibold]];
1022
1115
  NSMutableAttributedString *titleString = [[NSMutableAttributedString alloc]
1023
1116
  initWithString:[g_selectButton title]];
1024
1117
  [titleString addAttribute:NSForegroundColorAttributeName
@@ -1026,11 +1119,11 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1026
1119
  range:NSMakeRange(0, [titleString length])];
1027
1120
  [g_selectButton setAttributedTitle:titleString];
1028
1121
 
1029
- // Add shadow for better visibility
1030
- [g_selectButton.layer setShadowColor:[[NSColor blackColor] CGColor]];
1031
- [g_selectButton.layer setShadowOffset:NSMakeSize(0, -2)];
1032
- [g_selectButton.layer setShadowRadius:4.0];
1033
- [g_selectButton.layer setShadowOpacity:0.3];
1122
+ // Enhanced shadow for modern look
1123
+ [g_selectButton.layer setShadowColor:[[NSColor colorWithRed:0.0 green:0.3 blue:0.7 alpha:0.8] CGColor]];
1124
+ [g_selectButton.layer setShadowOffset:NSMakeSize(0, -3)];
1125
+ [g_selectButton.layer setShadowRadius:8.0];
1126
+ [g_selectButton.layer setShadowOpacity:0.4];
1034
1127
 
1035
1128
  // Create delegate for button action and timer
1036
1129
  g_delegate = [[WindowSelectorDelegate alloc] init];
@@ -1047,13 +1140,14 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1047
1140
  [cancelButton setBezelStyle:NSBezelStyleRegularSquare];
1048
1141
  [cancelButton setFont:[NSFont systemFontOfSize:14 weight:NSFontWeightMedium]];
1049
1142
 
1050
- // Gray cancel button styling
1143
+ // Modern cancel button styling
1051
1144
  [cancelButton setWantsLayer:YES];
1052
- [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:0.9] CGColor]];
1053
- [cancelButton.layer setCornerRadius:10.0];
1145
+ [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:0.9] CGColor]];
1146
+ [cancelButton.layer setCornerRadius:12.0];
1054
1147
  [cancelButton.layer setBorderWidth:0.0];
1055
1148
 
1056
- // White text for cancel button
1149
+ // White text for cancel button with better font
1150
+ [cancelButton setFont:[NSFont systemFontOfSize:15 weight:NSFontWeightMedium]];
1057
1151
  NSMutableAttributedString *cancelTitleString = [[NSMutableAttributedString alloc]
1058
1152
  initWithString:[cancelButton title]];
1059
1153
  [cancelTitleString addAttribute:NSForegroundColorAttributeName
@@ -1061,11 +1155,11 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1061
1155
  range:NSMakeRange(0, [cancelTitleString length])];
1062
1156
  [cancelButton setAttributedTitle:cancelTitleString];
1063
1157
 
1064
- // Add shadow for cancel button
1065
- [cancelButton.layer setShadowColor:[[NSColor blackColor] CGColor]];
1066
- [cancelButton.layer setShadowOffset:NSMakeSize(0, -1)];
1067
- [cancelButton.layer setShadowRadius:2.0];
1068
- [cancelButton.layer setShadowOpacity:0.2];
1158
+ // Enhanced shadow for cancel button
1159
+ [cancelButton.layer setShadowColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.8] CGColor]];
1160
+ [cancelButton.layer setShadowOffset:NSMakeSize(0, -2)];
1161
+ [cancelButton.layer setShadowRadius:4.0];
1162
+ [cancelButton.layer setShadowOpacity:0.3];
1069
1163
 
1070
1164
  [cancelButton setTarget:g_delegate];
1071
1165
  [cancelButton setAction:@selector(cancelButtonClicked:)];