Skip to content

Commit 6c233f4

Browse files
committed
PR feedback
1 parent 32ad729 commit 6c233f4

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

packages/react-native/React/CoreModules/RCTLogBoxView.mm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,10 @@ - (instancetype)initWithWindow:(RCTPlatformWindow *)window surfacePresenter:(id<
7979
#if !TARGET_OS_OSX // [macOS]
8080
self = [super initWithWindowScene:window.windowScene];
8181
#else // [macOS
82-
self = [super
83-
initWithContentRect:NSMakeRect(0, 0, 600, 800)
84-
styleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskFullSizeContentView
85-
backing:NSBackingStoreBuffered
86-
defer:YES];
82+
self = [super initWithContentRect:NSMakeRect(0, 0, 600, 800)
83+
styleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskFullSizeContentView
84+
backing:NSBackingStoreBuffered
85+
defer:YES];
8786
_window = window;
8887
#endif // macOS]
8988

packages/react-native/React/DevSupport/RCTPausedInDebuggerOverlayController.mm

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ - (void)viewDidLoad
8585
#if !TARGET_OS_OSX // [macOS]
8686
UIStackView *stackView = [[UIStackView alloc] initWithArrangedSubviews:@[ messageContainer, resumeButton ]];
8787
stackView.backgroundColor = [UIColor colorWithRed:1 green:1 blue:0.757 alpha:1];
88-
stackView.axis = UILayoutConstraintAxisHorizontal;
89-
stackView.distribution = UIStackViewDistributionFill;
90-
stackView.alignment = UIStackViewAlignmentCenter;
9188
stackView.layer.cornerRadius = 12;
9289
stackView.layer.borderWidth = 2;
9390
stackView.layer.borderColor = [UIColor colorWithRed:0.71 green:0.71 blue:0.62 alpha:1].CGColor;
9491
stackView.translatesAutoresizingMaskIntoConstraints = NO;
92+
stackView.axis = UILayoutConstraintAxisHorizontal;
93+
stackView.distribution = UIStackViewDistributionFill;
94+
stackView.alignment = UIStackViewAlignmentCenter;
9595

9696
UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self
9797
action:@selector(handleResume:)];
@@ -101,10 +101,10 @@ - (void)viewDidLoad
101101
NSStackView *stackView = [NSStackView stackViewWithViews:@[ messageContainer, resumeButton ]];
102102
stackView.wantsLayer = YES;
103103
stackView.layer.backgroundColor = [NSColor colorWithRed:1 green:1 blue:0.757 alpha:1].CGColor;
104+
stackView.translatesAutoresizingMaskIntoConstraints = NO;
104105
stackView.orientation = NSUserInterfaceLayoutOrientationHorizontal;
105106
stackView.distribution = NSStackViewDistributionFill;
106107
stackView.alignment = NSLayoutAttributeCenterY;
107-
stackView.translatesAutoresizingMaskIntoConstraints = NO;
108108

109109
NSClickGestureRecognizer *gestureRecognizer = [[NSClickGestureRecognizer alloc] initWithTarget:self
110110
action:@selector(handleResume:)];
@@ -116,11 +116,7 @@ - (void)viewDidLoad
116116

117117
[NSLayoutConstraint activateConstraints:@[
118118
[stackView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor constant:12],
119-
[stackView.topAnchor constraintEqualToAnchor:self.view.topAnchor constant:20],
120-
[stackView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor constant:20],
121-
[stackView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor constant:-20],
122-
[stackView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-20],
123-
[stackView.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor],
119+
[stackView.centerXAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.centerXAnchor],
124120
]];
125121
#else
126122
[self setView:stackView];
@@ -199,8 +195,8 @@ - (void)hide
199195
{
200196
#if !TARGET_OS_OSX // [macOS]
201197
[_alertWindow setHidden:YES];
198+
202199
_alertWindow.windowScene = nil;
203-
_alertWindow = nil;
204200
#else // [macOS]
205201
NSWindow *parentWindow = RCTKeyWindow();
206202
if (parentWindow) {
@@ -211,8 +207,9 @@ - (void)hide
211207
}
212208
}
213209
}
214-
_alertWindow = nil;
215210
#endif // macOS]
211+
212+
_alertWindow = nil;
216213
}
217214

218215
@end

0 commit comments

Comments
 (0)