Reskin: Use the new [RiotDesignValues applyStyleOnNavigationBar:] method everywhere

Note that we do not change anymore the bar tint color when changing tabs. This is alwasy the same.
This commit is contained in:
manuroe
2018-11-29 17:31:41 +01:00
parent c688d88282
commit 5beaa454db
40 changed files with 94 additions and 167 deletions
+4 -14
View File
@@ -97,8 +97,8 @@
- (void)userInterfaceThemeDidChange
{
self.view.backgroundColor = kRiotPrimaryBgColor;
self.defaultBarTintColor = kRiotSecondaryBgColor;
[RiotDesignValues applyStyleOnNavigationBar:self.navigationController.navigationBar];
self.barTitleColor = kRiotPrimaryTextColor;
self.activityIndicator.backgroundColor = kRiotOverlayColor;
@@ -282,19 +282,9 @@
UINavigationController *usersDevicesNavigationController = [[RiotNavigationController alloc] init];
// Set Riot navigation bar colors
[RiotDesignValues applyStyleOnNavigationBar:usersDevicesNavigationController.navigationBar];
usersDevicesNavigationController.navigationBar.barTintColor = kRiotPrimaryBgColor;
NSDictionary<NSString *,id> *titleTextAttributes = usersDevicesNavigationController.navigationBar.titleTextAttributes;
if (titleTextAttributes)
{
NSMutableDictionary *textAttributes = [NSMutableDictionary dictionaryWithDictionary:titleTextAttributes];
textAttributes[NSForegroundColorAttributeName] = kRiotPrimaryTextColor;
usersDevicesNavigationController.navigationBar.titleTextAttributes = textAttributes;
}
else if (kRiotPrimaryTextColor)
{
usersDevicesNavigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: kRiotPrimaryTextColor};
}
[usersDevicesNavigationController pushViewController:usersDevicesViewController animated:NO];
[self presentViewController:usersDevicesNavigationController animated:YES completion:nil];