reskin: Create ThemeService.shared

This commit is contained in:
manuroe
2019-01-11 11:45:27 +01:00
parent d94284a100
commit bed6b151cb
112 changed files with 758 additions and 728 deletions
@@ -60,7 +60,7 @@
self.passWordTextField.placeholder = NSLocalizedStringFromTable(@"auth_new_password_placeholder", @"Vector", nil);
self.repeatPasswordTextField.placeholder = NSLocalizedStringFromTable(@"auth_repeat_new_password_placeholder", @"Vector", nil);
if (ThemeService.theme.placeholderTextColor)
if (ThemeService.shared.theme.placeholderTextColor)
{
// Apply placeholder color
[self customizeViewRendering];
@@ -105,37 +105,37 @@
{
[super customizeViewRendering];
self.messageLabel.textColor = ThemeService.theme.textPrimaryColor;
self.messageLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
self.emailTextField.textColor = ThemeService.theme.textPrimaryColor;
self.passWordTextField.textColor = ThemeService.theme.textPrimaryColor;
self.repeatPasswordTextField.textColor = ThemeService.theme.textPrimaryColor;
self.emailTextField.textColor = ThemeService.shared.theme.textPrimaryColor;
self.passWordTextField.textColor = ThemeService.shared.theme.textPrimaryColor;
self.repeatPasswordTextField.textColor = ThemeService.shared.theme.textPrimaryColor;
self.messageLabel.numberOfLines = 0;
[self.nextStepButton.layer setCornerRadius:5];
self.nextStepButton.clipsToBounds = YES;
self.nextStepButton.backgroundColor = ThemeService.theme.tintColor;
self.nextStepButton.backgroundColor = ThemeService.shared.theme.tintColor;
if (ThemeService.theme.placeholderTextColor)
if (ThemeService.shared.theme.placeholderTextColor)
{
if (self.emailTextField.placeholder)
{
self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.emailTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.theme.placeholderTextColor}];
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
if (self.passWordTextField.placeholder)
{
self.passWordTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.passWordTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.theme.placeholderTextColor}];
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
if (self.repeatPasswordTextField.placeholder)
{
self.repeatPasswordTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.repeatPasswordTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.theme.placeholderTextColor}];
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
}
}