From 737b04f1f919914236ff20f3e3b1618dd778396c Mon Sep 17 00:00:00 2001 From: Monte Thakkar Date: Sun, 11 Nov 2018 17:36:57 -0800 Subject: [PATCH 1/5] updated ios red box - looks better --- RNTester/RNTester/Info.plist | 2 ++ React/Modules/RCTRedBox.m | 29 ++++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/RNTester/RNTester/Info.plist b/RNTester/RNTester/Info.plist index 828b7b591e8847..13573d49b86602 100644 --- a/RNTester/RNTester/Info.plist +++ b/RNTester/RNTester/Info.plist @@ -2,6 +2,8 @@ + UIStatusBarStyle + UIStatusBarStyleBlackTranslucent CFBundleDevelopmentRegion en CFBundleExecutable diff --git a/React/Modules/RCTRedBox.m b/React/Modules/RCTRedBox.m index f44f4fd0245b63..ce023579b34b00 100644 --- a/React/Modules/RCTRedBox.m +++ b/React/Modules/RCTRedBox.m @@ -47,7 +47,7 @@ - (instancetype)initWithFrame:(CGRect)frame #else self.windowLevel = UIWindowLevelStatusBar - 1; #endif - self.backgroundColor = [UIColor colorWithRed:0.8 green:0 blue:0 alpha:1]; + self.backgroundColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1]; self.hidden = YES; UIViewController *rootController = [UIViewController new]; @@ -88,37 +88,40 @@ - (instancetype)initWithFrame:(CGRect)frame dismissButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleRightMargin; dismissButton.accessibilityIdentifier = @"redbox-dismiss"; dismissButton.titleLabel.font = [UIFont systemFontOfSize:13]; + dismissButton.backgroundColor = [UIColor colorWithRed:0.82 green:0.10 blue:0.15 alpha:1.0]; [dismissButton setTitle:dismissText forState:UIControlStateNormal]; - [dismissButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateNormal]; - [dismissButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + [dismissButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [dismissButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateHighlighted]; [dismissButton addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside]; UIButton *reloadButton = [UIButton buttonWithType:UIButtonTypeCustom]; reloadButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; reloadButton.accessibilityIdentifier = @"redbox-reload"; reloadButton.titleLabel.font = [UIFont systemFontOfSize:13]; - + reloadButton.backgroundColor = [UIColor colorWithRed:0.82 green:0.10 blue:0.15 alpha:1.0]; [reloadButton setTitle:reloadText forState:UIControlStateNormal]; - [reloadButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateNormal]; - [reloadButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + [reloadButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [reloadButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateHighlighted]; [reloadButton addTarget:self action:@selector(reload) forControlEvents:UIControlEventTouchUpInside]; UIButton *copyButton = [UIButton buttonWithType:UIButtonTypeCustom]; copyButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; copyButton.accessibilityIdentifier = @"redbox-copy"; copyButton.titleLabel.font = [UIFont systemFontOfSize:13]; + copyButton.backgroundColor = [UIColor colorWithRed:0.82 green:0.10 blue:0.15 alpha:1.0]; [copyButton setTitle:copyText forState:UIControlStateNormal]; - [copyButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateNormal]; - [copyButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + [copyButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [copyButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateHighlighted]; [copyButton addTarget:self action:@selector(copyStack) forControlEvents:UIControlEventTouchUpInside]; UIButton *extraButton = [UIButton buttonWithType:UIButtonTypeCustom]; extraButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; extraButton.accessibilityIdentifier = @"redbox-extra"; extraButton.titleLabel.font = [UIFont systemFontOfSize:13]; + extraButton.backgroundColor = [UIColor colorWithRed:0.82 green:0.10 blue:0.15 alpha:1.0]; [extraButton setTitle:extraText forState:UIControlStateNormal]; - [extraButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateNormal]; - [extraButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + [extraButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [extraButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateHighlighted]; [extraButton addTarget:self action:@selector(showExtraDataViewController) forControlEvents:UIControlEventTouchUpInside]; CGFloat buttonWidth = self.bounds.size.width / 4; @@ -254,7 +257,7 @@ - (UITableViewCell *)reuseCell:(UITableViewCell *)cell forErrorMessage:(NSString cell.textLabel.lineBreakMode = NSLineBreakByWordWrapping; cell.textLabel.numberOfLines = 0; cell.detailTextLabel.textColor = [UIColor whiteColor]; - cell.backgroundColor = [UIColor clearColor]; + cell.backgroundColor = [UIColor colorWithRed:0.82 green:0.10 blue:0.15 alpha:1.0]; cell.selectionStyle = UITableViewCellSelectionStyleNone; } @@ -267,11 +270,11 @@ - (UITableViewCell *)reuseCell:(UITableViewCell *)cell forStackFrame:(RCTJSStack { if (!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"]; - cell.textLabel.textColor = [UIColor colorWithWhite:1 alpha:0.9]; + cell.textLabel.textColor = [UIColor whiteColor]; cell.textLabel.font = [UIFont fontWithName:@"Menlo-Regular" size:14]; cell.textLabel.lineBreakMode = NSLineBreakByCharWrapping; cell.textLabel.numberOfLines = 2; - cell.detailTextLabel.textColor = [UIColor colorWithWhite:1 alpha:0.7]; + cell.detailTextLabel.textColor = [UIColor colorWithRed:0.95 green:0.78 blue:0.78 alpha:1.0]; cell.detailTextLabel.font = [UIFont fontWithName:@"Menlo-Regular" size:11]; cell.detailTextLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; cell.backgroundColor = [UIColor clearColor]; From b203c9d374300e53e055f69b6704e1e7fe037406 Mon Sep 17 00:00:00 2001 From: Monte Thakkar Date: Sun, 11 Nov 2018 17:56:16 -0800 Subject: [PATCH 2/5] updated android red box - much better --- .../src/main/res/devsupport/layout/redbox_item_title.xml | 1 + ReactAndroid/src/main/res/devsupport/layout/redbox_view.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/res/devsupport/layout/redbox_item_title.xml b/ReactAndroid/src/main/res/devsupport/layout/redbox_item_title.xml index 8091fb4d32574e..97360378c4e36d 100644 --- a/ReactAndroid/src/main/res/devsupport/layout/redbox_item_title.xml +++ b/ReactAndroid/src/main/res/devsupport/layout/redbox_item_title.xml @@ -7,4 +7,5 @@ android:textColor="@android:color/white" android:textSize="16sp" android:textStyle="bold" + android:background="#D01926" /> diff --git a/ReactAndroid/src/main/res/devsupport/layout/redbox_view.xml b/ReactAndroid/src/main/res/devsupport/layout/redbox_view.xml index 832ac4fb877e63..da3b98373ea844 100644 --- a/ReactAndroid/src/main/res/devsupport/layout/redbox_view.xml +++ b/ReactAndroid/src/main/res/devsupport/layout/redbox_view.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="#E80000" + android:background="#1A1A1A" >