diff --git a/Riot/Constants/Colors/DarkTheme.swift b/Riot/Constants/Colors/DarkTheme.swift index 3ae71a512..18c7b3edc 100644 --- a/Riot/Constants/Colors/DarkTheme.swift +++ b/Riot/Constants/Colors/DarkTheme.swift @@ -55,6 +55,12 @@ final class DarkTheme: NSObject, Theme { let keyboardAppearance: UIKeyboardAppearance = .dark + let placeholderTextColor: UIColor? = UIColor(white: 1.0, alpha: 0.3) + + let selectedBackgroundColor: UIColor? = UIColor.black + + let overlayBackgroundColor: UIColor = UIColor(white: 0.7, alpha: 0.5) + let matrixSearchBackgroundImageTintColor: UIColor = UIColor(rgb: 0x7E7E7E) func applyStyle(onNavigationBar navigationBar: UINavigationBar) { diff --git a/Riot/Constants/Colors/DefaultTheme.swift b/Riot/Constants/Colors/DefaultTheme.swift index 7ea6013aa..b94149347 100644 --- a/Riot/Constants/Colors/DefaultTheme.swift +++ b/Riot/Constants/Colors/DefaultTheme.swift @@ -55,6 +55,14 @@ final class DefaultTheme: NSObject, Theme { let keyboardAppearance: UIKeyboardAppearance = .light + // Use default 70% gray color. + var placeholderTextColor: UIColor? + + // Use the default selection color + var selectedBackgroundColor: UIColor? + + let overlayBackgroundColor: UIColor = UIColor(white: 0.7, alpha: 0.5) + let matrixSearchBackgroundImageTintColor: UIColor = UIColor(rgb: 0xE7E7E7) func applyStyle(onNavigationBar navigationBar: UINavigationBar) { diff --git a/Riot/Constants/Colors/Theme.swift b/Riot/Constants/Colors/Theme.swift index e7dede486..de181bd3a 100644 --- a/Riot/Constants/Colors/Theme.swift +++ b/Riot/Constants/Colors/Theme.swift @@ -56,9 +56,18 @@ import UIKit var keyboardAppearance : UIKeyboardAppearance { get } - // MARK: - Colors that have currently few usage and may disappear in a redesign + // MARK: - Colors not defined in the design palette + /// nil is used to keep the default color + var placeholderTextColor: UIColor? { get } + + /// nil is used to keep the default color + var selectedBackgroundColor: UIColor? { get } + + /// fading behind dialog modals + var overlayBackgroundColor: UIColor { get } + /// Color to tint the search background image var matrixSearchBackgroundImageTintColor: UIColor { get } diff --git a/Riot/Constants/RiotDesignValues.h b/Riot/Constants/RiotDesignValues.h index e5d7909eb..fe0918824 100644 --- a/Riot/Constants/RiotDesignValues.h +++ b/Riot/Constants/RiotDesignValues.h @@ -35,11 +35,6 @@ extern NSString *const kRiotDesignValuesDidChangeThemeNotification; blue:((float)((rgbValue & 0x0000FF) >> 0))/255.0 \ alpha:1.0] -#pragma mark - Riot Theme Colors (depends on the selected theme light or dark). -extern UIColor *kRiotPlaceholderTextColor; // nil is used to keep the default color. -extern UIColor *kRiotSelectedBgColor; // nil is used to keep the default color. -extern UIColor *kRiotOverlayColor; // fading behind dialog modals. This color includes the transparency value. - #pragma mark - Riot Colors extern UIColor *kRiotColorPinkRed; extern UIColor *kRiotColorRed; diff --git a/Riot/Constants/RiotDesignValues.m b/Riot/Constants/RiotDesignValues.m index 33d4a05fd..e4a2deaf1 100644 --- a/Riot/Constants/RiotDesignValues.m +++ b/Riot/Constants/RiotDesignValues.m @@ -26,10 +26,6 @@ NSString *const kRiotDesignValuesDidChangeThemeNotification = @"kRiotDesignValuesDidChangeThemeNotification"; -UIColor *kRiotPlaceholderTextColor; -UIColor *kRiotSelectedBgColor; -UIColor *kRiotOverlayColor; - // Riot Colors UIColor *kRiotColorPinkRed; UIColor *kRiotColorRed; @@ -111,31 +107,16 @@ UIScrollViewIndicatorStyle kRiotScrollBarStyle; if ([themeId isEqualToString:@"dark"]) { // Set dark theme colors - kRiotPlaceholderTextColor = [UIColor colorWithWhite:1.0 alpha:0.3]; - kRiotSelectedBgColor = [UIColor blackColor]; - - kRiotOverlayColor = [UIColor colorWithWhite:0.3 alpha:0.5]; - kRiotScrollBarStyle = UIScrollViewIndicatorStyleWhite; } else if ([themeId isEqualToString:@"black"]) { // Set black theme colors - kRiotPlaceholderTextColor = [UIColor colorWithWhite:1.0 alpha:0.3]; - kRiotSelectedBgColor = [UIColor blackColor]; - - kRiotOverlayColor = [UIColor colorWithWhite:0.3 alpha:0.5]; - kRiotScrollBarStyle = UIScrollViewIndicatorStyleWhite; } else { // Set light theme colors by default. - kRiotPlaceholderTextColor = nil; // Use default 70% gray color. - kRiotSelectedBgColor = nil; // Use the default selection color. - - kRiotOverlayColor = [UIColor colorWithWhite:0.7 alpha:0.5]; - kRiotScrollBarStyle = UIScrollViewIndicatorStyleDefault; } diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 62ca41c73..d3c83c199 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -138,19 +138,19 @@ self.authenticationScrollView.backgroundColor = RiotDesignValues.theme.backgroundColor; self.authFallbackContentView.backgroundColor = RiotDesignValues.theme.backgroundColor; - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { if (self.homeServerTextField.placeholder) { self.homeServerTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.homeServerTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } if (self.identityServerTextField.placeholder) { self.identityServerTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.identityServerTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } } @@ -176,7 +176,7 @@ self.identityServerTextField.textColor = RiotDesignValues.theme.textPrimaryColor; self.identityServerLabel.textColor = RiotDesignValues.theme.textSecondaryColor; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; [self.authInputsView customizeViewRendering]; diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.m b/Riot/Modules/Authentication/Views/AuthInputsView.m index 62df4a34a..7ee5e48de 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.m +++ b/Riot/Modules/Authentication/Views/AuthInputsView.m @@ -72,7 +72,7 @@ self.repeatPasswordTextField.placeholder = NSLocalizedStringFromTable(@"auth_repeat_password_placeholder", @"Vector", nil); self.passWordTextField.placeholder = NSLocalizedStringFromTable(@"auth_password_placeholder", @"Vector", nil); - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { // Apply placeholder color [self customizeViewRendering]; @@ -116,20 +116,20 @@ self.messageLabel.textColor = RiotDesignValues.theme.textSecondaryColor; self.messageLabel.numberOfLines = 0; - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { if (self.userLoginTextField.placeholder) { self.userLoginTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.userLoginTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } if (self.repeatPasswordTextField.placeholder) { self.repeatPasswordTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.repeatPasswordTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } @@ -137,21 +137,21 @@ { self.passWordTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.passWordTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } if (self.phoneTextField.placeholder) { self.phoneTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.phoneTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } if (self.emailTextField.placeholder) { self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.emailTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } } } @@ -196,14 +196,14 @@ self.messageLabel.text = NSLocalizedStringFromTable(@"or", @"Vector", nil); self.phoneTextField.placeholder = NSLocalizedStringFromTable(@"auth_phone_placeholder", @"Vector", nil); - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { self.userLoginTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.userLoginTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; self.phoneTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.phoneTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } self.userLoginContainer.hidden = NO; @@ -1025,11 +1025,11 @@ { self.passWordTextField.returnKeyType = UIReturnKeyNext; - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { self.userLoginTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"auth_user_name_placeholder", @"Vector", nil) - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } else { @@ -1057,11 +1057,11 @@ self.emailTextField.placeholder = NSLocalizedStringFromTable(@"auth_optional_email_placeholder", @"Vector", nil); } - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.emailTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } self.emailContainer.hidden = NO; @@ -1085,11 +1085,11 @@ self.phoneTextField.placeholder = NSLocalizedStringFromTable(@"auth_optional_phone_placeholder", @"Vector", nil); } - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { self.phoneTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.phoneTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } self.phoneContainer.hidden = NO; diff --git a/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m b/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m index 67c54cf3e..a4bb9e550 100644 --- a/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m +++ b/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m @@ -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 (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { // Apply placeholder color [self customizeViewRendering]; @@ -117,25 +117,25 @@ self.nextStepButton.clipsToBounds = YES; self.nextStepButton.backgroundColor = RiotDesignValues.theme.tintColor; - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { if (self.emailTextField.placeholder) { self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.emailTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } if (self.passWordTextField.placeholder) { self.passWordTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.passWordTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } if (self.repeatPasswordTextField.placeholder) { self.repeatPasswordTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.repeatPasswordTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } } } diff --git a/Riot/Modules/BugReport/BugReportViewController.m b/Riot/Modules/BugReport/BugReportViewController.m index 1476d2474..91fc084b6 100644 --- a/Riot/Modules/BugReport/BugReportViewController.m +++ b/Riot/Modules/BugReport/BugReportViewController.m @@ -140,9 +140,9 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; - self.overlayView.backgroundColor = kRiotOverlayColor; + self.overlayView.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.overlayView.alpha = 1.0; self.containerView.backgroundColor = RiotDesignValues.theme.backgroundColor; diff --git a/Riot/Modules/Call/CallViewController.m b/Riot/Modules/Call/CallViewController.m index 4b247a1a4..b8f7e1086 100644 --- a/Riot/Modules/Call/CallViewController.m +++ b/Riot/Modules/Call/CallViewController.m @@ -101,7 +101,7 @@ [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; self.barTitleColor = RiotDesignValues.theme.textPrimaryColor; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.callerNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.callStatusLabel.textColor = RiotDesignValues.theme.baseTextSecondaryColor; diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index 2d6c416d1..2c182798c 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -161,7 +161,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Use the primary bg color for the recents table view in plain style. self.recentsTableView.backgroundColor = RiotDesignValues.theme.backgroundColor; @@ -1188,10 +1188,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Common/SegmentedViewController/SegmentedViewController.m b/Riot/Modules/Common/SegmentedViewController/SegmentedViewController.m index f59ddb601..17921f3b6 100644 --- a/Riot/Modules/Common/SegmentedViewController/SegmentedViewController.m +++ b/Riot/Modules/Common/SegmentedViewController/SegmentedViewController.m @@ -180,7 +180,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.view.backgroundColor = RiotDesignValues.theme.backgroundColor; } diff --git a/Riot/Modules/Common/WebViewController/WebViewViewController.m b/Riot/Modules/Common/WebViewController/WebViewViewController.m index 1a6669803..25f900f71 100644 --- a/Riot/Modules/Common/WebViewController/WebViewViewController.m +++ b/Riot/Modules/Common/WebViewController/WebViewViewController.m @@ -54,7 +54,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; webView.backgroundColor = RiotDesignValues.theme.backgroundColor; } diff --git a/Riot/Modules/Communities/GroupsViewController.m b/Riot/Modules/Communities/GroupsViewController.m index 863a7039f..7fa81a360 100644 --- a/Riot/Modules/Communities/GroupsViewController.m +++ b/Riot/Modules/Communities/GroupsViewController.m @@ -118,7 +118,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Use the primary bg color for the recents table view in plain style. self.groupsTableView.backgroundColor = RiotDesignValues.theme.backgroundColor; @@ -427,10 +427,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Communities/Home/GroupHomeViewController.m b/Riot/Modules/Communities/Home/GroupHomeViewController.m index d2a66b5e5..43c62d7af 100644 --- a/Riot/Modules/Communities/Home/GroupHomeViewController.m +++ b/Riot/Modules/Communities/Home/GroupHomeViewController.m @@ -115,7 +115,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.view.backgroundColor = RiotDesignValues.theme.backgroundColor; self.mainHeaderContainer.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; diff --git a/Riot/Modules/Communities/Members/GroupParticipantsViewController.m b/Riot/Modules/Communities/Members/GroupParticipantsViewController.m index 59b100273..9b8a39c59 100644 --- a/Riot/Modules/Communities/Members/GroupParticipantsViewController.m +++ b/Riot/Modules/Communities/Members/GroupParticipantsViewController.m @@ -147,7 +147,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; [self refreshSearchBarItemsColor:_searchBarView]; @@ -880,10 +880,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Communities/Rooms/GroupRoomsViewController.m b/Riot/Modules/Communities/Rooms/GroupRoomsViewController.m index 71c9c394d..4958580e6 100644 --- a/Riot/Modules/Communities/Rooms/GroupRoomsViewController.m +++ b/Riot/Modules/Communities/Rooms/GroupRoomsViewController.m @@ -128,7 +128,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; [self refreshSearchBarItemsColor:_searchBarView]; @@ -490,10 +490,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Contacts/ContactsTableViewController.m b/Riot/Modules/Contacts/ContactsTableViewController.m index 5d7b0b690..a2e4fe1d5 100644 --- a/Riot/Modules/Contacts/ContactsTableViewController.m +++ b/Riot/Modules/Contacts/ContactsTableViewController.m @@ -106,7 +106,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.contactsTableView.backgroundColor = ((self.contactsTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -291,10 +291,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Contacts/Details/ContactDetailsViewController.m b/Riot/Modules/Contacts/Details/ContactDetailsViewController.m index 450d3ebb4..3cfd959ec 100644 --- a/Riot/Modules/Contacts/Details/ContactDetailsViewController.m +++ b/Riot/Modules/Contacts/Details/ContactDetailsViewController.m @@ -233,7 +233,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.headerView.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; self.contactNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; @@ -782,10 +782,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/GlobalSearch/Files/HomeFilesSearchViewController.m b/Riot/Modules/GlobalSearch/Files/HomeFilesSearchViewController.m index 37d4f17f2..defcbab58 100644 --- a/Riot/Modules/GlobalSearch/Files/HomeFilesSearchViewController.m +++ b/Riot/Modules/GlobalSearch/Files/HomeFilesSearchViewController.m @@ -73,7 +73,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.searchTableView.backgroundColor = ((self.searchTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -156,10 +156,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/GlobalSearch/Messages/HomeMessagesSearchViewController.m b/Riot/Modules/GlobalSearch/Messages/HomeMessagesSearchViewController.m index 4ca9ff535..2249b3031 100644 --- a/Riot/Modules/GlobalSearch/Messages/HomeMessagesSearchViewController.m +++ b/Riot/Modules/GlobalSearch/Messages/HomeMessagesSearchViewController.m @@ -80,7 +80,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.searchTableView.backgroundColor = ((self.searchTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -199,10 +199,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m b/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m index c29b62396..dec10d228 100644 --- a/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m +++ b/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m @@ -73,7 +73,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -160,10 +160,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/MediaPicker/Library/MediaAlbumContentViewController.m b/Riot/Modules/MediaPicker/Library/MediaAlbumContentViewController.m index 094506bbc..416a20115 100644 --- a/Riot/Modules/MediaPicker/Library/MediaAlbumContentViewController.m +++ b/Riot/Modules/MediaPicker/Library/MediaAlbumContentViewController.m @@ -116,7 +116,7 @@ [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; self.assetsCollectionView.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; } - (UIStatusBarStyle)preferredStatusBarStyle diff --git a/Riot/Modules/MediaPicker/MediaPickerViewController.m b/Riot/Modules/MediaPicker/MediaPickerViewController.m index 7df9fd2cd..b726a5307 100644 --- a/Riot/Modules/MediaPicker/MediaPickerViewController.m +++ b/Riot/Modules/MediaPicker/MediaPickerViewController.m @@ -184,7 +184,7 @@ static void *RecordingContext = &RecordingContext; { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.cameraVideoCaptureProgressView.progressColor = RiotDesignValues.theme.backgroundColor; self.cameraVideoCaptureProgressView.unprogressColor = [UIColor clearColor]; @@ -1768,10 +1768,10 @@ static void *RecordingContext = &RecordingContext; cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/Attachements/AttachmentsViewController.m b/Riot/Modules/Room/Attachements/AttachmentsViewController.m index 3b189ef60..378fe3ec0 100644 --- a/Riot/Modules/Room/Attachements/AttachmentsViewController.m +++ b/Riot/Modules/Room/Attachements/AttachmentsViewController.m @@ -62,7 +62,7 @@ [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; self.view.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.backButton.tintColor = RiotDesignValues.theme.tintColor; } diff --git a/Riot/Modules/Room/Files/RoomFilesViewController.m b/Riot/Modules/Room/Files/RoomFilesViewController.m index 07bdce754..61927b015 100644 --- a/Riot/Modules/Room/Files/RoomFilesViewController.m +++ b/Riot/Modules/Room/Files/RoomFilesViewController.m @@ -112,7 +112,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.bubblesTableView.backgroundColor = ((self.bubblesTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -196,10 +196,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m index 5f048513f..987c9bde3 100644 --- a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m +++ b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m @@ -221,7 +221,7 @@ [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; self.navigationController.navigationBar.translucent = YES; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.memberHeaderView.backgroundColor = RiotDesignValues.theme.baseColor; self.roomMemberNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; @@ -846,10 +846,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/Members/RoomParticipantsViewController.m b/Riot/Modules/Room/Members/RoomParticipantsViewController.m index b82abf08a..106b6f010 100644 --- a/Riot/Modules/Room/Members/RoomParticipantsViewController.m +++ b/Riot/Modules/Room/Members/RoomParticipantsViewController.m @@ -159,7 +159,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; [self refreshSearchBarItemsColor:_searchBarView]; @@ -1178,10 +1178,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m b/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m index 30d362b5f..585f76522 100644 --- a/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m +++ b/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m @@ -96,9 +96,9 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; - self.overlayView.backgroundColor = kRiotOverlayColor; + self.overlayView.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; self.overlayView.alpha = 1.0; self.titleLabel.textColor = RiotDesignValues.theme.textPrimaryColor; @@ -243,10 +243,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index e540570a3..1c70aebc3 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -421,7 +421,7 @@ [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; self.navigationController.navigationBar.translucent = YES; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Prepare jump to last unread banner self.jumpToLastUnreadBannerContainer.backgroundColor = RiotDesignValues.theme.backgroundColor; @@ -3341,10 +3341,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/Search/Files/RoomFilesSearchViewController.m b/Riot/Modules/Room/Search/Files/RoomFilesSearchViewController.m index e405965a5..4d1b60fbb 100644 --- a/Riot/Modules/Room/Search/Files/RoomFilesSearchViewController.m +++ b/Riot/Modules/Room/Search/Files/RoomFilesSearchViewController.m @@ -74,7 +74,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.searchTableView.backgroundColor = ((self.searchTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -149,10 +149,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/Search/Messages/RoomMessagesSearchViewController.m b/Riot/Modules/Room/Search/Messages/RoomMessagesSearchViewController.m index 1d8a281f5..42d6123ec 100644 --- a/Riot/Modules/Room/Search/Messages/RoomMessagesSearchViewController.m +++ b/Riot/Modules/Room/Search/Messages/RoomMessagesSearchViewController.m @@ -75,7 +75,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.searchTableView.backgroundColor = ((self.searchTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -176,10 +176,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index cb168feee..b84ea93d1 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -268,7 +268,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -2499,11 +2499,11 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti addAddressTextField = addAddressCell.mxkTextField; addAddressTextField.placeholder = [NSString stringWithFormat:NSLocalizedStringFromTable(@"room_details_new_address_placeholder", @"Vector", nil), self.mainSession.matrixRestClient.homeserverSuffix]; - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { addAddressTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:addAddressTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } addAddressTextField.userInteractionEnabled = YES; addAddressTextField.text = currentValue; @@ -2590,11 +2590,11 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti addGroupTextField = addCommunityCell.mxkTextField; addGroupTextField.placeholder = [NSString stringWithFormat:NSLocalizedStringFromTable(@"room_details_new_flair_placeholder", @"Vector", nil), self.mainSession.matrixRestClient.homeserverSuffix]; - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { addGroupTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:addGroupTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } addGroupTextField.userInteractionEnabled = YES; addGroupTextField.text = currentValue; @@ -2825,10 +2825,10 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Rooms/DirectoryPicker/DirectoryServerPickerViewController.m b/Riot/Modules/Rooms/DirectoryPicker/DirectoryServerPickerViewController.m index bdf219446..e22454615 100644 --- a/Riot/Modules/Rooms/DirectoryPicker/DirectoryServerPickerViewController.m +++ b/Riot/Modules/Rooms/DirectoryPicker/DirectoryServerPickerViewController.m @@ -122,7 +122,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -229,10 +229,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m b/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m index e926afcf4..13d07cbbc 100644 --- a/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m +++ b/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m @@ -125,7 +125,7 @@ static CGFloat const kTextFontSize = 15.0; { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; } - (void)setupStringAttributes diff --git a/Riot/Modules/Settings/Language/LanguagePickerViewController.m b/Riot/Modules/Settings/Language/LanguagePickerViewController.m index 09d671eda..224fa5a60 100644 --- a/Riot/Modules/Settings/Language/LanguagePickerViewController.m +++ b/Riot/Modules/Settings/Language/LanguagePickerViewController.m @@ -71,7 +71,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; [RiotDesignValues.theme applyStyleOnSearchBar:self.searchBar]; @@ -119,10 +119,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m b/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m index 5cc119e37..73d26ed7a 100644 --- a/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m +++ b/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m @@ -74,7 +74,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; [RiotDesignValues.theme applyStyleOnSearchBar:self.searchBar]; @@ -123,10 +123,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index edf8db390..9bb49e631 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -336,7 +336,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -1527,11 +1527,11 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); { newEmailCell.mxkLabel.text = nil; newEmailCell.mxkTextField.placeholder = NSLocalizedStringFromTable(@"settings_email_address_placeholder", @"Vector", nil); - if (kRiotPlaceholderTextColor) + if (RiotDesignValues.theme.placeholderTextColor) { newEmailCell.mxkTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:newEmailCell.mxkTextField.placeholder - attributes:@{NSForegroundColorAttributeName: kRiotPlaceholderTextColor}]; + attributes:@{NSForegroundColorAttributeName: RiotDesignValues.theme.placeholderTextColor}]; } newEmailCell.mxkTextField.text = newEmailTextField.text; newEmailCell.mxkTextField.userInteractionEnabled = YES; @@ -2367,10 +2367,10 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); if (cell.selectionStyle != UITableViewCellSelectionStyleNone) { // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/StartChat/StartChatViewController.m b/Riot/Modules/StartChat/StartChatViewController.m index d9cfb7edf..08f4b73c3 100644 --- a/Riot/Modules/StartChat/StartChatViewController.m +++ b/Riot/Modules/StartChat/StartChatViewController.m @@ -384,10 +384,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else { diff --git a/Riot/Modules/UserDevices/UsersDevicesViewController.m b/Riot/Modules/UserDevices/UsersDevicesViewController.m index 6d18b145a..7cbd10a38 100644 --- a/Riot/Modules/UserDevices/UsersDevicesViewController.m +++ b/Riot/Modules/UserDevices/UsersDevicesViewController.m @@ -84,7 +84,7 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.activityIndicator.backgroundColor = kRiotOverlayColor; + self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor; // Check the table view style to select its bg color. self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor); @@ -181,10 +181,10 @@ cell.backgroundColor = RiotDesignValues.theme.backgroundColor; // Update the selected background view - if (kRiotSelectedBgColor) + if (RiotDesignValues.theme.selectedBackgroundColor) { cell.selectedBackgroundView = [[UIView alloc] init]; - cell.selectedBackgroundView.backgroundColor = kRiotSelectedBgColor; + cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor; } else {