Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions WooCommerce/WooCommerce.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5729,9 +5729,7 @@
Logging/WPAuthenticatorLogging.h,
"NSURL+IDN/NSURL+IDN.h",
NUX/WPNUXMainButton.h,
NUX/WPNUXPrimaryButton.h,
NUX/WPNUXSecondaryButton.h,
NUX/WPWalkthroughOverlayView.h,
NUX/WPWalkthroughTextField.h,
Services/LoginFacade.h,
Services/WordPressXMLRPCAPIFacade.h,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ extension FancyAlertViewController {
return FancyAlertViewController.controllerWithConfiguration(configuration: config)
}

/// Shows a WPWalkthroughOverlayView for a bad url error message.
/// Shows a view for a bad url error message.
///
/// - Parameter message: The error message to show.
///
Expand Down
5 changes: 0 additions & 5 deletions WooCommerce/WordPressAuthenticator/NUX/WPNUXPrimaryButton.h

This file was deleted.

58 changes: 0 additions & 58 deletions WooCommerce/WordPressAuthenticator/NUX/WPNUXPrimaryButton.m

This file was deleted.

16 changes: 13 additions & 3 deletions WooCommerce/WordPressAuthenticator/NUX/WPNUXSecondaryButton.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import "WPNUXSecondaryButton.h"
#import <UIKit/UIKit.h>
@import WordPressSharedObjC;


Expand Down Expand Up @@ -31,25 +32,34 @@ - (void)sizeToFit

// Adjust frame to account for the edge insets
CGRect frame = self.frame;
frame.size.width += self.titleEdgeInsets.left + self.titleEdgeInsets.right;
frame.size.width += self.configuration.contentInsets.leading + self.configuration.contentInsets.trailing;
self.frame = frame;
}

- (CGSize)intrinsicContentSize
{
CGSize size = [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
size.width += self.titleEdgeInsets.left + self.titleEdgeInsets.right;
size.width += self.configuration.contentInsets.leading + self.configuration.contentInsets.trailing;
return size;
}

#pragma mark - Private Methods

- (void)configureButton
{
UIButtonConfiguration *config = [UIButtonConfiguration plainButtonConfiguration];
config.contentInsets = NSDirectionalEdgeInsetsMake(
WPNUXSecondaryButtonTitleEdgeInsets.top,
WPNUXSecondaryButtonTitleEdgeInsets.left,
WPNUXSecondaryButtonTitleEdgeInsets.bottom,
WPNUXSecondaryButtonTitleEdgeInsets.right
);
self.configuration = config;

self.titleLabel.font = [WPFontManager systemRegularFontOfSize:15.0];
self.titleLabel.minimumScaleFactor = 10.0/15.0;
self.titleLabel.adjustsFontSizeToFitWidth = YES;
[self setTitleEdgeInsets:WPNUXSecondaryButtonTitleEdgeInsets];

[self setTitleColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0] forState:UIControlStateNormal];
[self setTitleColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.4] forState:UIControlStateHighlighted];
}
Expand Down
31 changes: 0 additions & 31 deletions WooCommerce/WordPressAuthenticator/NUX/WPWalkthroughOverlayView.h

This file was deleted.

Loading