node-mac-recorder 2.10.27 → 2.10.29
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 +23 -16
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -84,8 +84,8 @@ void updateScreenOverlays();
|
|
|
84
84
|
self.isActiveWindow = YES;
|
|
85
85
|
self.highlightFrame = NSZeroRect;
|
|
86
86
|
|
|
87
|
-
//
|
|
88
|
-
self.layer.backgroundColor = [[NSColor
|
|
87
|
+
// Semi-transparent background for full-screen overlay (50% less transparency = more opaque)
|
|
88
|
+
self.layer.backgroundColor = [[NSColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.3] CGColor];
|
|
89
89
|
|
|
90
90
|
// Disable focus ring completely
|
|
91
91
|
[self setFocusRingType:NSFocusRingTypeNone];
|
|
@@ -117,14 +117,21 @@ void updateScreenOverlays();
|
|
|
117
117
|
NSColor *strokeColor;
|
|
118
118
|
|
|
119
119
|
if (self.isToggled) {
|
|
120
|
-
// Locked state:
|
|
121
|
-
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.
|
|
122
|
-
strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.
|
|
120
|
+
// Locked state: 50% less transparency (more opaque)
|
|
121
|
+
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.75]; // 0.5 -> 0.75
|
|
122
|
+
strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.95]; // 0.9 -> 0.95
|
|
123
|
+
} else {
|
|
124
|
+
// Normal state: 50% less transparency (more opaque)
|
|
125
|
+
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.6]; // 0.4 -> 0.6
|
|
126
|
+
strokeColor = [NSColor colorWithRed:0.7 green:0.5 blue:0.95 alpha:0.9]; // 0.8 -> 0.9
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
[fillColor setFill];
|
|
126
130
|
[highlightPath fill];
|
|
127
|
-
|
|
131
|
+
|
|
132
|
+
[strokeColor setStroke];
|
|
133
|
+
[highlightPath setLineWidth:1.0];
|
|
134
|
+
[highlightPath stroke];
|
|
128
135
|
}
|
|
129
136
|
|
|
130
137
|
- (void)updateAppearance {
|
|
@@ -850,7 +857,7 @@ void updateOverlay() {
|
|
|
850
857
|
[infoLabel setBezeled:NO];
|
|
851
858
|
[infoLabel setDrawsBackground:NO];
|
|
852
859
|
[infoLabel setAlignment:NSTextAlignmentCenter];
|
|
853
|
-
[infoLabel setFont:[NSFont systemFontOfSize:
|
|
860
|
+
[infoLabel setFont:[NSFont systemFontOfSize:23.4 weight:NSFontWeightMedium]]; // 18 * 1.3 = 23.4
|
|
854
861
|
[infoLabel setTextColor:[NSColor whiteColor]];
|
|
855
862
|
|
|
856
863
|
// Force no borders on info label
|
|
@@ -922,19 +929,19 @@ void updateOverlay() {
|
|
|
922
929
|
NSString *labelAppName = [windowUnderCursor objectForKey:@"appName"] ?: @"Unknown App";
|
|
923
930
|
[infoLabel setStringValue:[NSString stringWithFormat:@"%@\n%@", labelAppName, labelWindowTitle]];
|
|
924
931
|
|
|
925
|
-
// Position buttons - Start Record in center of
|
|
932
|
+
// Position buttons - Start Record in absolute center of overlay
|
|
926
933
|
if (g_selectButton) {
|
|
927
934
|
NSSize buttonSize = [g_selectButton frame].size;
|
|
928
|
-
NSRect
|
|
935
|
+
NSRect overlayFrame = [g_overlayView frame]; // Use overlay view frame for proper centering
|
|
929
936
|
NSPoint buttonCenter = NSMakePoint(
|
|
930
|
-
(
|
|
931
|
-
(
|
|
937
|
+
(overlayFrame.size.width - buttonSize.width) / 2,
|
|
938
|
+
(overlayFrame.size.height - buttonSize.height) / 2 + 30 // Slightly above center
|
|
932
939
|
);
|
|
933
940
|
[g_selectButton setFrameOrigin:buttonCenter];
|
|
934
941
|
|
|
935
|
-
// Position app icon above text label in
|
|
942
|
+
// Position app icon above text label in absolute overlay center
|
|
936
943
|
NSPoint iconCenter = NSMakePoint(
|
|
937
|
-
(
|
|
944
|
+
(overlayFrame.size.width - 96) / 2, // Center horizontally on overlay
|
|
938
945
|
buttonCenter.y + buttonSize.height + 60 + 10 // Above label + text height + margin
|
|
939
946
|
);
|
|
940
947
|
[appIconView setFrameOrigin:iconCenter];
|
|
@@ -955,9 +962,9 @@ void updateOverlay() {
|
|
|
955
962
|
floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
|
956
963
|
[appIconView.layer addAnimation:floatAnimationX forKey:@"floatAnimationX"];
|
|
957
964
|
|
|
958
|
-
// Position info label in
|
|
965
|
+
// Position info label in absolute overlay center, above button
|
|
959
966
|
NSPoint labelCenter = NSMakePoint(
|
|
960
|
-
(
|
|
967
|
+
(overlayFrame.size.width - [infoLabel frame].size.width) / 2, // Center horizontally on overlay
|
|
961
968
|
buttonCenter.y + buttonSize.height + 10 // 10px above button, below icon
|
|
962
969
|
);
|
|
963
970
|
[infoLabel setFrameOrigin:labelCenter];
|
|
@@ -975,7 +982,7 @@ void updateOverlay() {
|
|
|
975
982
|
if (cancelButton) {
|
|
976
983
|
NSSize cancelButtonSize = [cancelButton frame].size;
|
|
977
984
|
NSPoint cancelButtonCenter = NSMakePoint(
|
|
978
|
-
(screenFrame.size.width - cancelButtonSize.width) / 2, // Center horizontally on screen
|
|
985
|
+
(screenFrame.size.width - cancelButtonSize.width) / 2, // Center horizontally on main screen
|
|
979
986
|
buttonCenter.y - buttonSize.height - 20 // 20px below main button
|
|
980
987
|
);
|
|
981
988
|
[cancelButton setFrameOrigin:cancelButtonCenter];
|