Skip to content
Open
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
10 changes: 10 additions & 0 deletions Mage/ChangePasswordViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,21 @@ - (void) applyThemeWithContainerScheme:(id<MDCContainerScheming>)containerScheme
[self.passwordField applyThemeWithScheme:containerScheme];
[self.currentPasswordField applyThemeWithScheme:containerScheme];
[self.confirmPasswordField applyThemeWithScheme:containerScheme];
UIColor *placeholderTextColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
[self.usernameField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.passwordField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.currentPasswordField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.confirmPasswordField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];

self.usernameField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.passwordField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.confirmPasswordField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.currentPasswordField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];

self.usernameField.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.passwordField.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.currentPasswordField.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.confirmPasswordField.tintColor = self.scheme.colorScheme.onSurfaceColor;

self.mageLabel.textColor = self.scheme.colorScheme.primaryColorVariant;
self.wandLabel.textColor = self.scheme.colorScheme.primaryColorVariant;
Expand Down
3 changes: 3 additions & 0 deletions Mage/GeometryEditViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ - (void) themeTextField: (MDCFilledTextField *) field withScheme: (id<MDCContain
[field applyThemeWithScheme:containerScheme];
[field setFilledBackgroundColor:[containerScheme.colorScheme.surfaceColor colorWithAlphaComponent:0.87] forState:MDCTextControlStateNormal];
[field setFilledBackgroundColor:[containerScheme.colorScheme.surfaceColor colorWithAlphaComponent:0.87] forState:MDCTextControlStateEditing];
UIColor *placeholderTextColor = [containerScheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
[field setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
field.tintColor = containerScheme.colorScheme.onSurfaceColor;
}

- (void) applyThemeTextField: (MDCFilledTextField *) field {
Expand Down
6 changes: 6 additions & 0 deletions Mage/LdapLoginView.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ - (void) applyThemeWithContainerScheme:(id<MDCContainerScheming>)containerScheme
}
[self.usernameField applyThemeWithScheme:containerScheme];
[self.passwordField applyThemeWithScheme:containerScheme];
UIColor *placeholderTextColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
[self.usernameField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.passwordField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];

self.usernameField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.passwordField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];

self.usernameField.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.passwordField.tintColor = self.scheme.colorScheme.onSurfaceColor;

self.showPasswordLabel.textColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];

[self.authenticationButton applyThemeWithContainerScheme:containerScheme];
Expand Down
8 changes: 6 additions & 2 deletions Mage/LocalLoginView.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ - (void) applyThemeWithContainerScheme:(id<MDCContainerScheming>)containerScheme
self.scheme = containerScheme;
[self.usernameField applyThemeWithScheme:containerScheme];
[self.passwordField applyThemeWithScheme:containerScheme];

UIColor *placeholderTextColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
[self.usernameField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.passwordField setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];

self.usernameField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.passwordField.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.usernameField.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.passwordField.tintColor = self.scheme.colorScheme.onSurfaceColor;

self.showPasswordLabel.textColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.signupDescription.textColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
Expand Down Expand Up @@ -200,4 +205,3 @@ - (IBAction)signupTapped:(id)sender {
}

@end

13 changes: 10 additions & 3 deletions Mage/ServerURLController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,19 @@ class ServerURLController: UIViewController {
errorStatus.textColor = scheme.colorScheme.onSurfaceColor.withAlphaComponent(0.6)
okButton.applyContainedTheme(withScheme: scheme)
cancelButton.applyContainedTheme(withScheme: scheme)
serverURL.applyTheme(withScheme: scheme)
applyServerURLNormalTheme(with: scheme)
serverURL.leadingView?.tintColor = scheme.colorScheme.onSurfaceColor.withAlphaComponent(0.6)
errorImage.tintColor = scheme.colorScheme.errorColor
errorInfoLink.textColor = scheme.colorScheme.primaryColorVariant
errorInfoLink.font = UIFont.systemFont(ofSize: 12)
}

private func applyServerURLNormalTheme(with scheme: MDCContainerScheming) {
serverURL.applyTheme(withScheme: scheme)
let placeholderTextColor = scheme.colorScheme.onSurfaceColor.withAlphaComponent(0.6)
serverURL.tintColor = scheme.colorScheme.onSurfaceColor
serverURL.setFloatingLabelColor(placeholderTextColor, for: .editing)
}

public override func viewDidLoad() {
super.viewDidLoad();
Expand All @@ -196,7 +203,7 @@ class ServerURLController: UIViewController {
cancelButton.isHidden = true
serverURL.text = url?.absoluteString
} else if let scheme = scheme {
serverURL.applyTheme(withScheme: scheme)
applyServerURLNormalTheme(with: scheme)
}

if let url = url {
Expand Down Expand Up @@ -298,7 +305,7 @@ class ServerURLController: UIViewController {
progressView.startAnimating()
delegate?.setServerURL(url: url)
if let scheme = scheme {
serverURL.applyTheme(withScheme: scheme)
applyServerURLNormalTheme(with: scheme)
}
} else {
showError(error: "Invalid URL")
Expand Down
16 changes: 16 additions & 0 deletions Mage/SignUpViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ - (void) applyThemeWithContainerScheme:(id<MDCContainerScheming>)containerScheme
[self.email applyThemeWithScheme:containerScheme];
[self.phone applyThemeWithScheme:containerScheme];
[self.captchaText applyThemeWithScheme:containerScheme];
UIColor *placeholderTextColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
[self.username setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.displayName setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.password setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.passwordConfirm setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.email setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.phone setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];
[self.captchaText setFloatingLabelColor:placeholderTextColor forState:MDCTextControlStateEditing];

self.username.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.displayName.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
Expand All @@ -93,6 +101,14 @@ - (void) applyThemeWithContainerScheme:(id<MDCContainerScheming>)containerScheme
self.email.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.phone.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
self.captchaText.leadingView.tintColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];

self.username.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.displayName.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.password.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.passwordConfirm.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.email.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.phone.tintColor = self.scheme.colorScheme.onSurfaceColor;
self.captchaText.tintColor = self.scheme.colorScheme.onSurfaceColor;

self.captchaProgressView.backgroundColor = self.scheme.colorScheme.surfaceColor;
self.captchaProgressLabel.textColor = [self.scheme.colorScheme.onSurfaceColor colorWithAlphaComponent:0.6];
Expand Down