diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 76dc150cc..a09656203 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -740,7 +740,7 @@ private View createCloseButton(int id) { // Use TextView for text TextView close = new TextView(cordova.getActivity()); close.setText(closeButtonCaption); - close.setTextSize(20); + close.setTextSize(14); if (closeButtonColor != "") close.setTextColor(android.graphics.Color.parseColor(closeButtonColor)); close.setGravity(android.view.Gravity.CENTER_VERTICAL); close.setPadding(this.dpToPixels(10), 0, this.dpToPixels(10), 0); diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m index 2adcf0c1b..ad5c6a612 100644 --- a/src/ios/CDVWKInAppBrowser.m +++ b/src/ios/CDVWKInAppBrowser.m @@ -936,6 +936,11 @@ - (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString : (int) b // If color on closebutton is requested then initialize with that that color, otherwise use initialize with default self.closeButton.tintColor = colorString != nil ? [self colorFromHexString:colorString] : [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; + NSUInteger fontSize = 14; + UIFont *font = [UIFont systemFontOfSize:fontSize]; + NSDictionary *attributes = @{NSFontAttributeName: font}; + [self.closeButton setTitleTextAttributes:attributes forState:UIControlStateNormal]; + NSMutableArray* items = [self.toolbar.items mutableCopy]; [items replaceObjectAtIndex:buttonIndex withObject:self.closeButton]; [self.toolbar setItems:items];