Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 9a62ae3

Browse files
nheagyjkmassel
authored andcommitted
Improve some style names
1 parent 2089053 commit 9a62ae3

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

WordPressAuthenticator/Authenticator/WordPressAuthenticatorStyles.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public struct WordPressAuthenticatorStyle {
4141

4242
/// Style: Text Buttons
4343
///
44-
public let textButton: UIColor
44+
public let textButtonColor: UIColor
4545

46-
public let textButtonHighlight: UIColor
46+
public let textButtonHighlightColor: UIColor
4747

4848
/// Style: Labels
4949
///
@@ -71,7 +71,7 @@ public struct WordPressAuthenticatorStyle {
7171

7272
/// Designated initializer
7373
///
74-
public init(primaryNormalBackgroundColor: UIColor, primaryNormalBorderColor: UIColor, primaryHighlightBackgroundColor: UIColor, primaryHighlightBorderColor: UIColor, secondaryNormalBackgroundColor: UIColor, secondaryNormalBorderColor: UIColor, secondaryHighlightBackgroundColor: UIColor, secondaryHighlightBorderColor: UIColor, disabledBackgroundColor: UIColor, disabledBorderColor: UIColor, primaryTitleColor: UIColor, secondaryTitleColor: UIColor, disabledTitleColor: UIColor, textButton: UIColor, textButtonHighlight: UIColor, instructionColor: UIColor, subheadlineColor: UIColor, placeholderColor: UIColor, viewControllerBackgroundColor: UIColor, navBarImage: UIImage, prologueBackgroundColor: UIColor = WPStyleGuide.wordPressBlue(), prologueTitleColor: UIColor = .white) {
74+
public init(primaryNormalBackgroundColor: UIColor, primaryNormalBorderColor: UIColor, primaryHighlightBackgroundColor: UIColor, primaryHighlightBorderColor: UIColor, secondaryNormalBackgroundColor: UIColor, secondaryNormalBorderColor: UIColor, secondaryHighlightBackgroundColor: UIColor, secondaryHighlightBorderColor: UIColor, disabledBackgroundColor: UIColor, disabledBorderColor: UIColor, primaryTitleColor: UIColor, secondaryTitleColor: UIColor, disabledTitleColor: UIColor, textButtonColor: UIColor, textButtonHighlightColor: UIColor, instructionColor: UIColor, subheadlineColor: UIColor, placeholderColor: UIColor, viewControllerBackgroundColor: UIColor, navBarImage: UIImage, prologueBackgroundColor: UIColor = WPStyleGuide.wordPressBlue(), prologueTitleColor: UIColor = .white) {
7575
self.primaryNormalBackgroundColor = primaryNormalBackgroundColor
7676
self.primaryNormalBorderColor = primaryNormalBorderColor
7777
self.primaryHighlightBackgroundColor = primaryHighlightBackgroundColor
@@ -85,8 +85,8 @@ public struct WordPressAuthenticatorStyle {
8585
self.primaryTitleColor = primaryTitleColor
8686
self.secondaryTitleColor = secondaryTitleColor
8787
self.disabledTitleColor = disabledTitleColor
88-
self.textButton = textButton
89-
self.textButtonHighlight = textButtonHighlight
88+
self.textButtonColor = textButtonColor
89+
self.textButtonHighlightColor = textButtonHighlightColor
9090
self.instructionColor = instructionColor
9191
self.subheadlineColor = subheadlineColor
9292
self.placeholderColor = placeholderColor

WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ final class SubheadlineButton: UIButton {
77
super.traitCollectionDidChange(previousTraitCollection)
88
if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory {
99
titleLabel?.font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline)
10-
setTitleColor(WordPressAuthenticator.shared.style.textButton, for: .normal)
11-
setTitleColor(WordPressAuthenticator.shared.style.textButtonHighlight, for: .highlighted)
10+
setTitleColor(WordPressAuthenticator.shared.style.textButtonColor, for: .normal)
11+
setTitleColor(WordPressAuthenticator.shared.style.textButtonHighlightColor, for: .highlighted)
1212
}
1313
}
1414
}
@@ -104,8 +104,8 @@ extension WPStyleGuide {
104104
class func googleLoginButton() -> UIButton {
105105
let baseString = NSLocalizedString("{G} Log in with Google.", comment: "Label for button to log in using Google. The {G} will be replaced with the Google logo.")
106106

107-
let attrStrNormal = googleButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButton)
108-
let attrStrHighlight = googleButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButtonHighlight)
107+
let attrStrNormal = googleButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButtonColor)
108+
let attrStrHighlight = googleButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButtonHighlightColor)
109109

110110
let font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline)
111111

@@ -119,8 +119,8 @@ extension WPStyleGuide {
119119
class func selfHostedLoginButton() -> UIButton {
120120
let baseString = NSLocalizedString("Log in by entering your site address.", comment: "Label for button to log in using your site address.")
121121

122-
let attrStrNormal = selfHostedButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButton)
123-
let attrStrHighlight = selfHostedButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButtonHighlight)
122+
let attrStrNormal = selfHostedButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButtonColor)
123+
let attrStrHighlight = selfHostedButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.textButtonHighlightColor)
124124

125125
let font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline)
126126

WordPressAuthenticator/UI/SiteInfoHeaderView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private extension SiteInfoHeaderView {
115115
} else {
116116
blavatarImageView.layer.borderColor = WordPressAuthenticator.shared.style.instructionColor.cgColor
117117
blavatarImageView.layer.borderWidth = 1
118-
blavatarImageView.tintColor = WordPressAuthenticator.shared.style.instructionColor
118+
blavatarImageView.tintColor = WordPressAuthenticator.shared.style.placeholderColor
119119
}
120120
}
121121
}

0 commit comments

Comments
 (0)