reskin: Rename RiotDesignValues -> ThemeService

This commit is contained in:
manuroe
2019-01-11 10:32:56 +01:00
parent eef759a8fa
commit 712a632120
123 changed files with 992 additions and 1004 deletions
@@ -70,9 +70,9 @@
id UIApplicationWillChangeStatusBarOrientationNotificationObserver;
/**
Observe kRiotDesignValuesDidChangeThemeNotification to handle user interface theme change.
Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change.
*/
id kRiotDesignValuesDidChangeThemeNotificationObserver;
id kThemeServiceDidChangeThemeNotificationObserver;
/**
The current visibility of the status bar in this view controller.
@@ -208,7 +208,7 @@
}];
// Observe user interface theme change.
kRiotDesignValuesDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kRiotDesignValuesDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
[self userInterfaceThemeDidChange];
@@ -218,17 +218,17 @@
- (void)userInterfaceThemeDidChange
{
[RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
[ThemeService.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
self.navigationController.navigationBar.translucent = YES;
self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor;
self.activityIndicator.backgroundColor = ThemeService.theme.overlayBackgroundColor;
self.memberHeaderView.backgroundColor = RiotDesignValues.theme.baseColor;
self.roomMemberNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor;
self.roomMemberStatusLabel.textColor = RiotDesignValues.theme.tintColor;
self.memberHeaderView.backgroundColor = ThemeService.theme.baseColor;
self.roomMemberNameLabel.textColor = ThemeService.theme.textPrimaryColor;
self.roomMemberStatusLabel.textColor = ThemeService.theme.tintColor;
// Check the table view style to select its bg color.
self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor);
self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? ThemeService.theme.backgroundColor : ThemeService.theme.headerBackgroundColor);
self.view.backgroundColor = self.tableView.backgroundColor;
if (self.tableView.dataSource)
@@ -239,7 +239,7 @@
- (UIStatusBarStyle)preferredStatusBarStyle
{
return RiotDesignValues.theme.statusBarStyle;
return ThemeService.theme.statusBarStyle;
}
- (BOOL)prefersStatusBarHidden
@@ -303,10 +303,10 @@
UIApplicationWillChangeStatusBarOrientationNotificationObserver = nil;
}
if (kRiotDesignValuesDidChangeThemeNotificationObserver)
if (kThemeServiceDidChangeThemeNotificationObserver)
{
[[NSNotificationCenter defaultCenter] removeObserver:kRiotDesignValuesDidChangeThemeNotificationObserver];
kRiotDesignValuesDidChangeThemeNotificationObserver = nil;
[[NSNotificationCenter defaultCenter] removeObserver:kThemeServiceDidChangeThemeNotificationObserver];
kThemeServiceDidChangeThemeNotificationObserver = nil;
}
[memberTitleView removeFromSuperview];
@@ -360,7 +360,7 @@
}
return [MXKTools paintImage:[UIImage imageNamed:@"placeholder"]
withColor:RiotDesignValues.theme.tintColor];
withColor:ThemeService.theme.tintColor];
}
- (void)updateMemberInfo
@@ -781,8 +781,8 @@
}
else
{
[cellWithButton.mxkButton setTitleColor:RiotDesignValues.theme.textPrimaryColor forState:UIControlStateNormal];
[cellWithButton.mxkButton setTitleColor:RiotDesignValues.theme.textPrimaryColor forState:UIControlStateHighlighted];
[cellWithButton.mxkButton setTitleColor:ThemeService.theme.textPrimaryColor forState:UIControlStateNormal];
[cellWithButton.mxkButton setTitleColor:ThemeService.theme.textPrimaryColor forState:UIControlStateHighlighted];
}
[cellWithButton.mxkButton addTarget:self action:@selector(onActionButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
@@ -843,13 +843,13 @@
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;
{
cell.backgroundColor = RiotDesignValues.theme.backgroundColor;
cell.backgroundColor = ThemeService.theme.backgroundColor;
// Update the selected background view
if (RiotDesignValues.theme.selectedBackgroundColor)
if (ThemeService.theme.selectedBackgroundColor)
{
cell.selectedBackgroundView = [[UIView alloc] init];
cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor;
cell.selectedBackgroundView.backgroundColor = ThemeService.theme.selectedBackgroundColor;
}
else
{