diff --git a/Riot/Constants/RiotDesignValues.h b/Riot/Constants/RiotDesignValues.h index 9416ae1fe..8b639715f 100644 --- a/Riot/Constants/RiotDesignValues.h +++ b/Riot/Constants/RiotDesignValues.h @@ -36,7 +36,6 @@ extern NSString *const kRiotDesignValuesDidChangeThemeNotification; alpha:1.0] #pragma mark - Riot Theme Colors (depends on the selected theme light or dark). -extern UIColor *kRiotPrimaryTextColor; extern UIColor *kRiotSecondaryTextColor; //subtitle, sending messages color. extern UIColor *kRiotPlaceholderTextColor; // nil is used to keep the default color. extern UIColor *kRiotTopicTextColor; diff --git a/Riot/Constants/RiotDesignValues.m b/Riot/Constants/RiotDesignValues.m index bab61734a..418712e49 100644 --- a/Riot/Constants/RiotDesignValues.m +++ b/Riot/Constants/RiotDesignValues.m @@ -26,7 +26,6 @@ NSString *const kRiotDesignValuesDidChangeThemeNotification = @"kRiotDesignValuesDidChangeThemeNotification"; -UIColor *kRiotPrimaryTextColor; UIColor *kRiotSecondaryTextColor; UIColor *kRiotPlaceholderTextColor; UIColor *kRiotTopicTextColor; @@ -146,7 +145,6 @@ UIScrollViewIndicatorStyle kRiotScrollBarStyle; // Apply theme color constants id theme = [RiotDesignValues theme]; - kRiotPrimaryTextColor = theme.textPrimaryColor; kRiotSecondaryTextColor = theme.textSecondaryColor; kRiotTopicTextColor = theme.baseTextSecondaryColor; diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 56a18e78e..b1b2fc70b 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -170,10 +170,10 @@ [self.customServersTickButton setAttributedTitle:serverOptionsTitle forState:UIControlStateNormal]; [self.customServersTickButton setAttributedTitle:serverOptionsTitle forState:UIControlStateHighlighted]; - self.homeServerTextField.textColor = kRiotPrimaryTextColor; + self.homeServerTextField.textColor = RiotDesignValues.theme.textPrimaryColor; self.homeServerLabel.textColor = kRiotSecondaryTextColor; - self.identityServerTextField.textColor = kRiotPrimaryTextColor; + self.identityServerTextField.textColor = RiotDesignValues.theme.textPrimaryColor; self.identityServerLabel.textColor = kRiotSecondaryTextColor; self.activityIndicator.backgroundColor = kRiotOverlayColor; diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.m b/Riot/Modules/Authentication/Views/AuthInputsView.m index e801b1e26..b302dd986 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.m +++ b/Riot/Modules/Authentication/Views/AuthInputsView.m @@ -103,15 +103,15 @@ { [super customizeViewRendering]; - self.repeatPasswordTextField.textColor = kRiotPrimaryTextColor; - self.userLoginTextField.textColor = kRiotPrimaryTextColor; - self.passWordTextField.textColor = kRiotPrimaryTextColor; + self.repeatPasswordTextField.textColor = RiotDesignValues.theme.textPrimaryColor; + self.userLoginTextField.textColor = RiotDesignValues.theme.textPrimaryColor; + self.passWordTextField.textColor = RiotDesignValues.theme.textPrimaryColor; - self.emailTextField.textColor = kRiotPrimaryTextColor; - self.phoneTextField.textColor = kRiotPrimaryTextColor; + self.emailTextField.textColor = RiotDesignValues.theme.textPrimaryColor; + self.phoneTextField.textColor = RiotDesignValues.theme.textPrimaryColor; - self.isoCountryCodeLabel.textColor = kRiotPrimaryTextColor; - self.callingCodeLabel.textColor = kRiotPrimaryTextColor; + self.isoCountryCodeLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.callingCodeLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.messageLabel.textColor = kRiotSecondaryTextColor; self.messageLabel.numberOfLines = 0; diff --git a/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m b/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m index 2b15b4b58..67c54cf3e 100644 --- a/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m +++ b/Riot/Modules/Authentication/Views/ForgotPasswordInputsView.m @@ -105,11 +105,11 @@ { [super customizeViewRendering]; - self.messageLabel.textColor = kRiotPrimaryTextColor; + self.messageLabel.textColor = RiotDesignValues.theme.textPrimaryColor; - self.emailTextField.textColor = kRiotPrimaryTextColor; - self.passWordTextField.textColor = kRiotPrimaryTextColor; - self.repeatPasswordTextField.textColor = kRiotPrimaryTextColor; + self.emailTextField.textColor = RiotDesignValues.theme.textPrimaryColor; + self.passWordTextField.textColor = RiotDesignValues.theme.textPrimaryColor; + self.repeatPasswordTextField.textColor = RiotDesignValues.theme.textPrimaryColor; self.messageLabel.numberOfLines = 0; diff --git a/Riot/Modules/BugReport/BugReportViewController.m b/Riot/Modules/BugReport/BugReportViewController.m index 4cfeb35e2..1476d2474 100644 --- a/Riot/Modules/BugReport/BugReportViewController.m +++ b/Riot/Modules/BugReport/BugReportViewController.m @@ -150,14 +150,14 @@ self.bugReportDescriptionTextView.keyboardAppearance = RiotDesignValues.theme.keyboardAppearance; - self.titleLabel.textColor = kRiotPrimaryTextColor; - self.sendingLabel.textColor = kRiotPrimaryTextColor; - self.descriptionLabel.textColor = kRiotPrimaryTextColor; - self.bugReportDescriptionTextView.textColor = kRiotPrimaryTextColor; + self.titleLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.sendingLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.descriptionLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.bugReportDescriptionTextView.textColor = RiotDesignValues.theme.textPrimaryColor; self.bugReportDescriptionTextView.tintColor = RiotDesignValues.theme.tintColor; - self.logsDescriptionLabel.textColor = kRiotPrimaryTextColor; - self.sendLogsLabel.textColor = kRiotPrimaryTextColor; - self.sendScreenshotLabel.textColor = kRiotPrimaryTextColor; + self.logsDescriptionLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.sendLogsLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.sendScreenshotLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.sendButton.tintColor = RiotDesignValues.theme.tintColor; self.cancelButton.tintColor = RiotDesignValues.theme.tintColor; diff --git a/Riot/Modules/Call/CallViewController.m b/Riot/Modules/Call/CallViewController.m index 93e3ad985..ca54bbacf 100644 --- a/Riot/Modules/Call/CallViewController.m +++ b/Riot/Modules/Call/CallViewController.m @@ -100,10 +100,10 @@ { [RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; - self.barTitleColor = kRiotPrimaryTextColor; + self.barTitleColor = RiotDesignValues.theme.textPrimaryColor; self.activityIndicator.backgroundColor = kRiotOverlayColor; - self.callerNameLabel.textColor = kRiotPrimaryTextColor; + self.callerNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.callStatusLabel.textColor = kRiotTopicTextColor; self.localPreviewContainerView.layer.borderColor = RiotDesignValues.theme.tintColor.CGColor; diff --git a/Riot/Modules/Call/Views/IncomingCallView.m b/Riot/Modules/Call/Views/IncomingCallView.m index 82d4552c6..87cbd4c26 100644 --- a/Riot/Modules/Call/Views/IncomingCallView.m +++ b/Riot/Modules/Call/Views/IncomingCallView.m @@ -75,7 +75,7 @@ static const CGFloat kButtonSize = 80.0; self.callerNameLabel = [[UILabel alloc] init]; self.callerNameLabel.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.callerNameLabel.textColor = kRiotPrimaryTextColor; + self.callerNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.callerNameLabel.font = [UIFont systemFontOfSize:24.0 weight:UIFontWeightMedium]; self.callerNameLabel.text = callerName; self.callerNameLabel.textAlignment = NSTextAlignmentCenter; diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index 04dd79713..48d86f491 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -754,7 +754,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou } // Apply the current UI theme. - networkLabel.textColor = kRiotPrimaryTextColor; + networkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; directoryServerLabel.textColor = kRiotSecondaryTextColor; // Set the current directory server name diff --git a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m index 866263c7a..093a29e16 100644 --- a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m +++ b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m @@ -48,7 +48,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; { [super customizeTableViewCellRendering]; - self.roomTitle.textColor = kRiotPrimaryTextColor; + self.roomTitle.textColor = RiotDesignValues.theme.textPrimaryColor; self.lastEventDescription.textColor = kRiotSecondaryTextColor; self.lastEventDate.textColor = kRiotSecondaryTextColor; self.missedNotifAndUnreadBadgeLabel.textColor = RiotDesignValues.theme.backgroundColor; diff --git a/Riot/Modules/Communities/GroupsViewController.m b/Riot/Modules/Communities/GroupsViewController.m index f6eda95e3..863a7039f 100644 --- a/Riot/Modules/Communities/GroupsViewController.m +++ b/Riot/Modules/Communities/GroupsViewController.m @@ -453,7 +453,7 @@ { sectionHeader = [tableView dequeueReusableHeaderFooterViewWithIdentifier:MXKTableViewHeaderFooterWithLabel.defaultReuseIdentifier]; sectionHeader.mxkContentView.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; - sectionHeader.mxkLabel.textColor = kRiotPrimaryTextColor; + sectionHeader.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; sectionHeader.mxkLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; NSString* title = [self.dataSource tableView:tableView titleForHeaderInSection:section]; diff --git a/Riot/Modules/Communities/Home/GroupHomeViewController.m b/Riot/Modules/Communities/Home/GroupHomeViewController.m index bcf57b5e4..22377578c 100644 --- a/Riot/Modules/Communities/Home/GroupHomeViewController.m +++ b/Riot/Modules/Communities/Home/GroupHomeViewController.m @@ -120,7 +120,7 @@ self.view.backgroundColor = RiotDesignValues.theme.backgroundColor; self.mainHeaderContainer.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; - _groupName.textColor = kRiotPrimaryTextColor; + _groupName.textColor = RiotDesignValues.theme.textPrimaryColor; _groupDescription.textColor = kRiotTopicTextColor; _groupDescription.numberOfLines = 0; diff --git a/Riot/Modules/Communities/Members/GroupParticipantsViewController.m b/Riot/Modules/Communities/Members/GroupParticipantsViewController.m index fd162ff6c..9c30adbc0 100644 --- a/Riot/Modules/Communities/Members/GroupParticipantsViewController.m +++ b/Riot/Modules/Communities/Members/GroupParticipantsViewController.m @@ -915,7 +915,7 @@ { sectionHeader = [tableView dequeueReusableHeaderFooterViewWithIdentifier:MXKTableViewHeaderFooterWithLabel.defaultReuseIdentifier]; sectionHeader.mxkContentView.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; - sectionHeader.mxkLabel.textColor = kRiotPrimaryTextColor; + sectionHeader.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; sectionHeader.mxkLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; sectionHeader.mxkLabel.text = NSLocalizedStringFromTable(@"group_participants_invited_section", @"Vector", nil); diff --git a/Riot/Modules/Communities/Rooms/Views/GroupRoomTableViewCell.m b/Riot/Modules/Communities/Rooms/Views/GroupRoomTableViewCell.m index ea0d153b4..a4adb6d0b 100644 --- a/Riot/Modules/Communities/Rooms/Views/GroupRoomTableViewCell.m +++ b/Riot/Modules/Communities/Rooms/Views/GroupRoomTableViewCell.m @@ -20,6 +20,7 @@ #import "AvatarGenerator.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" @implementation GroupRoomTableViewCell @@ -36,7 +37,7 @@ { [super customizeTableViewCellRendering]; - self.roomDisplayName.textColor = kRiotPrimaryTextColor; + self.roomDisplayName.textColor = RiotDesignValues.theme.textPrimaryColor; self.roomTopic.textColor = kRiotSecondaryTextColor; _roomAvatar.defaultBackgroundColor = [UIColor clearColor]; diff --git a/Riot/Modules/Communities/Views/GroupTableViewCell.m b/Riot/Modules/Communities/Views/GroupTableViewCell.m index 538afc64d..5742fcaae 100644 --- a/Riot/Modules/Communities/Views/GroupTableViewCell.m +++ b/Riot/Modules/Communities/Views/GroupTableViewCell.m @@ -41,7 +41,7 @@ { [super customizeTableViewCellRendering]; - self.groupName.textColor = kRiotPrimaryTextColor; + self.groupName.textColor = RiotDesignValues.theme.textPrimaryColor; self.groupDescription.textColor = kRiotSecondaryTextColor; self.memberCount.textColor = kRiotSecondaryTextColor; diff --git a/Riot/Modules/Contacts/DataSources/ContactsDataSource.m b/Riot/Modules/Contacts/DataSources/ContactsDataSource.m index 3568d4ea6..89701adb3 100644 --- a/Riot/Modules/Contacts/DataSources/ContactsDataSource.m +++ b/Riot/Modules/Contacts/DataSources/ContactsDataSource.m @@ -970,7 +970,7 @@ } // Apply UI theme - checkboxLabel.textColor = kRiotPrimaryTextColor; + checkboxLabel.textColor = RiotDesignValues.theme.textPrimaryColor; // Set the right value of the tick box localContactsCheckbox.image = hideNonMatrixEnabledContacts ? [UIImage imageNamed:@"selection_tick"] : [UIImage imageNamed:@"selection_untick"]; diff --git a/Riot/Modules/Contacts/Details/ContactDetailsViewController.m b/Riot/Modules/Contacts/Details/ContactDetailsViewController.m index d7150176d..450d3ebb4 100644 --- a/Riot/Modules/Contacts/Details/ContactDetailsViewController.m +++ b/Riot/Modules/Contacts/Details/ContactDetailsViewController.m @@ -236,7 +236,7 @@ self.activityIndicator.backgroundColor = kRiotOverlayColor; self.headerView.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; - self.contactNameLabel.textColor = kRiotPrimaryTextColor; + self.contactNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.contactStatusLabel.textColor = RiotDesignValues.theme.tintColor; // Check the table view style to select its bg color. @@ -735,8 +735,8 @@ [cellWithButton.mxkButton setTitle:title forState:UIControlStateNormal]; [cellWithButton.mxkButton setTitle:title forState:UIControlStateHighlighted]; - [cellWithButton.mxkButton setTitleColor:kRiotPrimaryTextColor forState:UIControlStateNormal]; - [cellWithButton.mxkButton setTitleColor:kRiotPrimaryTextColor forState:UIControlStateHighlighted]; + [cellWithButton.mxkButton setTitleColor:RiotDesignValues.theme.textPrimaryColor forState:UIControlStateNormal]; + [cellWithButton.mxkButton setTitleColor:RiotDesignValues.theme.textPrimaryColor forState:UIControlStateHighlighted]; [cellWithButton.mxkButton addTarget:self action:@selector(onActionButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; diff --git a/Riot/Modules/Contacts/Details/Views/RoomTableViewCell.m b/Riot/Modules/Contacts/Details/Views/RoomTableViewCell.m index 37c535486..29c3aed7a 100644 --- a/Riot/Modules/Contacts/Details/Views/RoomTableViewCell.m +++ b/Riot/Modules/Contacts/Details/Views/RoomTableViewCell.m @@ -35,7 +35,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; { [super customizeTableViewCellRendering]; - self.titleLabel.textColor = kRiotPrimaryTextColor; + self.titleLabel.textColor = RiotDesignValues.theme.textPrimaryColor; // Prepare direct room border CGColorRef directRoomBorderColor = CGColorCreateCopyWithAlpha(RiotDesignValues.theme.tintColor.CGColor, kDirectRoomBorderColorAlpha); diff --git a/Riot/Modules/Contacts/Views/ContactTableViewCell.m b/Riot/Modules/Contacts/Views/ContactTableViewCell.m index 5e10b43c1..784fea296 100644 --- a/Riot/Modules/Contacts/Views/ContactTableViewCell.m +++ b/Riot/Modules/Contacts/Views/ContactTableViewCell.m @@ -53,7 +53,7 @@ [super customizeTableViewCellRendering]; // apply the vector colours - self.contactDisplayNameLabel.textColor = kRiotPrimaryTextColor; + self.contactDisplayNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.contactInformationLabel.textColor = kRiotSecondaryTextColor; // Clear the default background color of a MXKImageView instance diff --git a/Riot/Modules/EncryptionInfo/EncryptionInfoView.m b/Riot/Modules/EncryptionInfo/EncryptionInfoView.m index c9fe44e35..b3087cea3 100644 --- a/Riot/Modules/EncryptionInfo/EncryptionInfoView.m +++ b/Riot/Modules/EncryptionInfo/EncryptionInfoView.m @@ -30,7 +30,7 @@ self.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; self.textView.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.defaultTextColor = kRiotPrimaryTextColor; + self.defaultTextColor = RiotDesignValues.theme.textPrimaryColor; self.cancelButton.tintColor = RiotDesignValues.theme.tintColor; self.verifyButton.tintColor = RiotDesignValues.theme.tintColor; self.blockButton.tintColor = RiotDesignValues.theme.tintColor; diff --git a/Riot/Modules/GlobalSearch/Files/Views/FilesSearchTableViewCell.m b/Riot/Modules/GlobalSearch/Files/Views/FilesSearchTableViewCell.m index 1b851f5d0..f285f4eb5 100644 --- a/Riot/Modules/GlobalSearch/Files/Views/FilesSearchTableViewCell.m +++ b/Riot/Modules/GlobalSearch/Files/Views/FilesSearchTableViewCell.m @@ -28,7 +28,7 @@ { [super customizeTableViewCellRendering]; - self.title.textColor = kRiotPrimaryTextColor; + self.title.textColor = RiotDesignValues.theme.textPrimaryColor; self.message.textColor = kRiotSecondaryTextColor; diff --git a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m index 9d1a4aa76..de01419be 100644 --- a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m +++ b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.roomNameLabel.textColor = kRiotSecondaryTextColor; diff --git a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m index d718c2781..c9012f1eb 100644 --- a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m +++ b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.roomNameLabel.textColor = kRiotSecondaryTextColor; diff --git a/Riot/Modules/GlobalSearch/Views/DirectoryRecentTableViewCell.m b/Riot/Modules/GlobalSearch/Views/DirectoryRecentTableViewCell.m index 81e47d81c..2cc5a6c47 100644 --- a/Riot/Modules/GlobalSearch/Views/DirectoryRecentTableViewCell.m +++ b/Riot/Modules/GlobalSearch/Views/DirectoryRecentTableViewCell.m @@ -20,6 +20,7 @@ #import "PublicRoomsDirectoryDataSource.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" @implementation DirectoryRecentTableViewCell @@ -29,7 +30,7 @@ { [super customizeTableViewCellRendering]; - self.titleLabel.textColor = kRiotPrimaryTextColor; + self.titleLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.descriptionLabel.textColor = kRiotSecondaryTextColor; } diff --git a/Riot/Modules/GlobalSearch/Views/RoomIdOrAliasTableViewCell.m b/Riot/Modules/GlobalSearch/Views/RoomIdOrAliasTableViewCell.m index e65fce10b..c0ca9ce00 100644 --- a/Riot/Modules/GlobalSearch/Views/RoomIdOrAliasTableViewCell.m +++ b/Riot/Modules/GlobalSearch/Views/RoomIdOrAliasTableViewCell.m @@ -29,7 +29,7 @@ { [super customizeTableViewCellRendering]; - self.titleLabel.textColor = kRiotPrimaryTextColor; + self.titleLabel.textColor = RiotDesignValues.theme.textPrimaryColor; } - (void)layoutSubviews diff --git a/Riot/Modules/Home/Views/RoomCollectionViewCell.m b/Riot/Modules/Home/Views/RoomCollectionViewCell.m index 246ce8b70..53f8b9f1c 100644 --- a/Riot/Modules/Home/Views/RoomCollectionViewCell.m +++ b/Riot/Modules/Home/Views/RoomCollectionViewCell.m @@ -66,9 +66,9 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; { [super customizeCollectionViewCellRendering]; - self.roomTitle.textColor = kRiotPrimaryTextColor; - self.roomTitle1.textColor = kRiotPrimaryTextColor; - self.roomTitle2.textColor = kRiotPrimaryTextColor; + self.roomTitle.textColor = RiotDesignValues.theme.textPrimaryColor; + self.roomTitle1.textColor = RiotDesignValues.theme.textPrimaryColor; + self.roomTitle2.textColor = RiotDesignValues.theme.textPrimaryColor; self.missedNotifAndUnreadBadgeLabel.textColor = RiotDesignValues.theme.backgroundColor; // Prepare direct room border diff --git a/Riot/Modules/MediaPicker/Views/MediaAlbumTableCell.m b/Riot/Modules/MediaPicker/Views/MediaAlbumTableCell.m index a728a77b2..6013e520a 100644 --- a/Riot/Modules/MediaPicker/Views/MediaAlbumTableCell.m +++ b/Riot/Modules/MediaPicker/Views/MediaAlbumTableCell.m @@ -18,6 +18,7 @@ #import "MediaAlbumTableCell.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" @implementation MediaAlbumTableCell @@ -25,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.albumDisplayNameLabel.textColor = kRiotPrimaryTextColor; + self.albumDisplayNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.albumCountLabel.textColor = kRiotSecondaryTextColor; } diff --git a/Riot/Modules/PublicRoomList/Views/PublicRoomTableViewCell.m b/Riot/Modules/PublicRoomList/Views/PublicRoomTableViewCell.m index a8fbca4cc..4c82f0817 100644 --- a/Riot/Modules/PublicRoomList/Views/PublicRoomTableViewCell.m +++ b/Riot/Modules/PublicRoomList/Views/PublicRoomTableViewCell.m @@ -21,6 +21,7 @@ #import "AvatarGenerator.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" @implementation PublicRoomTableViewCell @@ -37,7 +38,7 @@ { [super customizeTableViewCellRendering]; - self.roomDisplayName.textColor = kRiotPrimaryTextColor; + self.roomDisplayName.textColor = RiotDesignValues.theme.textPrimaryColor; self.roomTopic.textColor = kRiotSecondaryTextColor; self.memberCount.textColor = kRiotSecondaryTextColor; diff --git a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m index 94650209f..5f048513f 100644 --- a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m +++ b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m @@ -224,7 +224,7 @@ self.activityIndicator.backgroundColor = kRiotOverlayColor; self.memberHeaderView.backgroundColor = RiotDesignValues.theme.baseColor; - self.roomMemberNameLabel.textColor = kRiotPrimaryTextColor; + self.roomMemberNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.roomMemberStatusLabel.textColor = RiotDesignValues.theme.tintColor; // Check the table view style to select its bg color. @@ -781,8 +781,8 @@ } else { - [cellWithButton.mxkButton setTitleColor:kRiotPrimaryTextColor forState:UIControlStateNormal]; - [cellWithButton.mxkButton setTitleColor:kRiotPrimaryTextColor forState:UIControlStateHighlighted]; + [cellWithButton.mxkButton setTitleColor:RiotDesignValues.theme.textPrimaryColor forState:UIControlStateNormal]; + [cellWithButton.mxkButton setTitleColor:RiotDesignValues.theme.textPrimaryColor forState:UIControlStateHighlighted]; } [cellWithButton.mxkButton addTarget:self action:@selector(onActionButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; diff --git a/Riot/Modules/Room/Members/RoomParticipantsViewController.m b/Riot/Modules/Room/Members/RoomParticipantsViewController.m index b059a2db0..09fbe8195 100644 --- a/Riot/Modules/Room/Members/RoomParticipantsViewController.m +++ b/Riot/Modules/Room/Members/RoomParticipantsViewController.m @@ -1223,7 +1223,7 @@ frame.size.width = sectionHeader.frame.size.width - 10; frame.size.height -= 10; UILabel *headerLabel = [[UILabel alloc] initWithFrame:frame]; - headerLabel.textColor = kRiotPrimaryTextColor; + headerLabel.textColor = RiotDesignValues.theme.textPrimaryColor; headerLabel.font = [UIFont boldSystemFontOfSize:15.0]; headerLabel.backgroundColor = [UIColor clearColor]; diff --git a/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m b/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m index b9ca8da95..84cdde9fa 100644 --- a/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m +++ b/Riot/Modules/Room/ReadReceiptsDetail/ReadReceiptsViewController.m @@ -101,7 +101,7 @@ self.overlayView.backgroundColor = kRiotOverlayColor; self.overlayView.alpha = 1.0; - self.titleLabel.textColor = kRiotPrimaryTextColor; + self.titleLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.containerView.backgroundColor = RiotDesignValues.theme.backgroundColor; // Check the table view style to select its bg color. @@ -196,7 +196,7 @@ { MXKReadReceiptTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[MXKReadReceiptTableViewCell defaultReuseIdentifier] forIndexPath:indexPath]; - cell.displayNameLabel.textColor = kRiotPrimaryTextColor; + cell.displayNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.receiptDescriptionLabel.textColor = kRiotSecondaryTextColor; if (indexPath.row < self.roomMembers.count) diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index f0d480bde..e540570a3 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -425,7 +425,7 @@ // Prepare jump to last unread banner self.jumpToLastUnreadBannerContainer.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.jumpToLastUnreadLabel.attributedText = [[NSAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"room_jump_to_first_unread", @"Vector", nil) attributes:@{NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle), NSUnderlineColorAttributeName: kRiotPrimaryTextColor, NSForegroundColorAttributeName: kRiotPrimaryTextColor}]; + self.jumpToLastUnreadLabel.attributedText = [[NSAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"room_jump_to_first_unread", @"Vector", nil) attributes:@{NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle), NSUnderlineColorAttributeName: RiotDesignValues.theme.textPrimaryColor, NSForegroundColorAttributeName: RiotDesignValues.theme.textPrimaryColor}]; self.expandedHeaderContainer.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index 2a94239b0..225793f9e 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -2053,7 +2053,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti { // Customize label style UITableViewHeaderFooterView *tableViewHeaderFooterView = (UITableViewHeaderFooterView*)view; - tableViewHeaderFooterView.textLabel.textColor = kRiotPrimaryTextColor; + tableViewHeaderFooterView.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; tableViewHeaderFooterView.textLabel.font = [UIFont systemFontOfSize:15]; } } @@ -2178,7 +2178,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti roomPhotoCell.mxkImageView.defaultBackgroundColor = [UIColor clearColor]; roomPhotoCell.mxkLabel.text = NSLocalizedStringFromTable(@"room_details_photo", @"Vector", nil); - roomPhotoCell.mxkLabel.textColor = kRiotPrimaryTextColor; + roomPhotoCell.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; if (updatedItemsDict[kRoomSettingsAvatarKey]) { @@ -2235,7 +2235,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti roomNameCell.mxkTextFieldTrailingConstraint.constant = 15; roomNameCell.mxkLabel.text = NSLocalizedStringFromTable(@"room_details_room_name", @"Vector", nil); - roomNameCell.mxkLabel.textColor = kRiotPrimaryTextColor; + roomNameCell.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; roomNameCell.accessoryType = UITableViewCellAccessoryNone; roomNameCell.accessoryView = nil; @@ -2280,10 +2280,10 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti NSArray *labels = roomTagCell.labels; UILabel *label; label = labels[0]; - label.textColor = kRiotPrimaryTextColor; + label.textColor = RiotDesignValues.theme.textPrimaryColor; label.text = NSLocalizedStringFromTable(@"room_details_favourite_tag", @"Vector", nil); label = labels[1]; - label.textColor = kRiotPrimaryTextColor; + label.textColor = RiotDesignValues.theme.textPrimaryColor; label.text = NSLocalizedStringFromTable(@"room_details_low_priority_tag", @"Vector", nil); if (updatedItemsDict[kRoomSettingsTagKey]) @@ -2525,7 +2525,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti UITableViewCell *addressCell = [tableView dequeueReusableCellWithIdentifier:kRoomSettingsAddressCellViewIdentifier forIndexPath:indexPath]; addressCell.textLabel.font = [UIFont systemFontOfSize:16]; - addressCell.textLabel.textColor = kRiotPrimaryTextColor; + addressCell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; addressCell.textLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; addressCell.accessoryView = nil; addressCell.accessoryType = UITableViewCellAccessoryNone; @@ -2616,7 +2616,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti UITableViewCell *communityCell = [tableView dequeueReusableCellWithIdentifier:kRoomSettingsAddressCellViewIdentifier forIndexPath:indexPath]; communityCell.textLabel.font = [UIFont systemFontOfSize:16]; - communityCell.textLabel.textColor = kRiotPrimaryTextColor; + communityCell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; communityCell.textLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; communityCell.accessoryView = nil; communityCell.accessoryType = UITableViewCellAccessoryNone; @@ -2634,7 +2634,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti UITableViewCell *addressCell = [tableView dequeueReusableCellWithIdentifier:kRoomSettingsAddressCellViewIdentifier forIndexPath:indexPath]; addressCell.textLabel.font = [UIFont systemFontOfSize:16]; - addressCell.textLabel.textColor = kRiotPrimaryTextColor; + addressCell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; addressCell.textLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; addressCell.accessoryView = nil; addressCell.accessoryType = UITableViewCellAccessoryNone; @@ -2656,7 +2656,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti cell.textLabel.font = [UIFont systemFontOfSize:17]; cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_room_id", @"Vector", nil); - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.detailTextLabel.font = [UIFont systemFontOfSize:15]; cell.detailTextLabel.text = mxRoomState.roomId; @@ -2719,7 +2719,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti cell.textLabel.font = [UIFont systemFontOfSize:17]; cell.textLabel.numberOfLines = 0; cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_enabled", @"Vector", nil); - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.selectionStyle = UITableViewCellSelectionStyleNone; } @@ -2753,7 +2753,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti cell.textLabel.font = [UIFont systemFontOfSize:17]; cell.textLabel.numberOfLines = 0; cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_disabled", @"Vector", nil); - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.selectionStyle = UITableViewCellSelectionStyleNone; } @@ -2801,7 +2801,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti cell.mxkLabelLeadingConstraint.constant = cell.separatorInset.left; cell.mxkSwitchTrailingConstraint.constant = 15; - cell.mxkLabel.textColor = kRiotPrimaryTextColor; + cell.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.mxkSwitch.onTintColor = RiotDesignValues.theme.tintColor; [cell.mxkSwitch removeTarget:self action:nil forControlEvents:UIControlEventValueChanged]; diff --git a/Riot/Modules/Room/Settings/Views/TableViewCellWithCheckBoxAndLabel.m b/Riot/Modules/Room/Settings/Views/TableViewCellWithCheckBoxAndLabel.m index e93bf1440..3ac1cf733 100644 --- a/Riot/Modules/Room/Settings/Views/TableViewCellWithCheckBoxAndLabel.m +++ b/Riot/Modules/Room/Settings/Views/TableViewCellWithCheckBoxAndLabel.m @@ -18,6 +18,7 @@ #import "TableViewCellWithCheckBoxAndLabel.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" @implementation TableViewCellWithCheckBoxAndLabel @@ -25,7 +26,7 @@ { [super customizeTableViewCellRendering]; - _label.textColor = kRiotPrimaryTextColor; + _label.textColor = RiotDesignValues.theme.textPrimaryColor; } - (void)setEnabled:(BOOL)enabled diff --git a/Riot/Modules/Room/Settings/Views/TableViewCellWithLabelAndLargeTextView.m b/Riot/Modules/Room/Settings/Views/TableViewCellWithLabelAndLargeTextView.m index 4260ad0f1..2b2cf6f03 100644 --- a/Riot/Modules/Room/Settings/Views/TableViewCellWithLabelAndLargeTextView.m +++ b/Riot/Modules/Room/Settings/Views/TableViewCellWithLabelAndLargeTextView.m @@ -18,6 +18,7 @@ #import "TableViewCellWithLabelAndLargeTextView.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" @implementation TableViewCellWithLabelAndLargeTextView @@ -36,8 +37,8 @@ { [super customizeTableViewCellRendering]; - _label.textColor = kRiotPrimaryTextColor; - _textView.textColor = kRiotPrimaryTextColor; + _label.textColor = RiotDesignValues.theme.textPrimaryColor; + _textView.textColor = RiotDesignValues.theme.textPrimaryColor; } - (void)layoutSubviews diff --git a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m index 0477efbd7..acead1d1b 100644 --- a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m +++ b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m @@ -356,7 +356,7 @@ [roomReplacementAttributedString appendAttributedString:roomLinkAttributedString]; NSRange wholeStringRange = NSMakeRange(0, roomReplacementAttributedString.length); - [roomReplacementAttributedString addAttribute:NSForegroundColorAttributeName value:kRiotPrimaryTextColor range:wholeStringRange]; + [roomReplacementAttributedString addAttribute:NSForegroundColorAttributeName value:RiotDesignValues.theme.textPrimaryColor range:wholeStringRange]; self.messageTextView.attributedText = roomReplacementAttributedString; } @@ -365,7 +365,7 @@ self.messageTextView.text = NSLocalizedStringFromTable(@"room_replacement_information", @"Vector", nil); } - self.messageTextView.tintColor = kRiotPrimaryTextColor; + self.messageTextView.tintColor = RiotDesignValues.theme.textPrimaryColor; self.messageTextView.hidden = NO; self.messageTextView.backgroundColor = [UIColor clearColor]; diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m index 26f82538e..36d9bb7c7 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.messageTextView.tintColor = RiotDesignValues.theme.tintColor; } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m index c44b53c11..51a5aba56 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.paginationLabel.textColor = RiotDesignValues.theme.tintColor; self.paginationSeparatorView.backgroundColor = RiotDesignValues.theme.tintColor; diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m index 0a18ab22a..eb3937c37 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.messageTextView.tintColor = RiotDesignValues.theme.tintColor; } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m index b098875da..384bbc946 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.paginationLabel.textColor = RiotDesignValues.theme.tintColor; self.paginationSeparatorView.backgroundColor = RiotDesignValues.theme.tintColor; diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m index e277347ea..f0f2dfebe 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.messageTextView.tintColor = RiotDesignValues.theme.tintColor; } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m index 259adac7e..4a0e72ee9 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.paginationLabel.textColor = RiotDesignValues.theme.tintColor; self.paginationSeparatorView.backgroundColor = RiotDesignValues.theme.tintColor; diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m index 633cba7e7..04c5d8f01 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m @@ -26,7 +26,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = kRiotPrimaryTextColor; + self.userNameLabel.textColor = RiotDesignValues.theme.textPrimaryColor; self.messageTextView.tintColor = RiotDesignValues.theme.tintColor; } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m index 674e2e115..7bc995254 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m @@ -58,7 +58,7 @@ static CGFloat const kCustomBackgroundCornerRadius = 5.0; { [super customizeTableViewCellRendering]; - self.messageTextView.tintColor = kRiotPrimaryTextColor; + self.messageTextView.tintColor = RiotDesignValues.theme.textPrimaryColor; self.customBackgroundView.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; } diff --git a/Riot/Modules/Room/Views/Event/EventDetailsView.m b/Riot/Modules/Room/Views/Event/EventDetailsView.m index 64742a570..605b636ce 100644 --- a/Riot/Modules/Room/Views/Event/EventDetailsView.m +++ b/Riot/Modules/Room/Views/Event/EventDetailsView.m @@ -27,7 +27,7 @@ self.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; self.textView.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.textView.textColor = kRiotPrimaryTextColor; + self.textView.textColor = RiotDesignValues.theme.textPrimaryColor; self.redactButton.tintColor = RiotDesignValues.theme.tintColor; self.closeButton.tintColor = RiotDesignValues.theme.tintColor; } diff --git a/Riot/Modules/Room/Views/InputToolbar/DisabledRoomInputToolbarView.m b/Riot/Modules/Room/Views/InputToolbar/DisabledRoomInputToolbarView.m index 39c727156..ff23658b1 100644 --- a/Riot/Modules/Room/Views/InputToolbar/DisabledRoomInputToolbarView.m +++ b/Riot/Modules/Room/Views/InputToolbar/DisabledRoomInputToolbarView.m @@ -51,7 +51,7 @@ self.separatorView.backgroundColor = kRiotAuxiliaryColor; self.disabledReasonTextView.font = [UIFont systemFontOfSize:15]; - self.disabledReasonTextView.textColor = kRiotPrimaryTextColor; + self.disabledReasonTextView.textColor = RiotDesignValues.theme.textPrimaryColor; self.disabledReasonTextView.tintColor = RiotDesignValues.theme.tintColor; self.disabledReasonTextView.editable = NO; self.disabledReasonTextView.scrollEnabled = NO; diff --git a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m index 1b7f21e19..ac7f5900a 100644 --- a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m +++ b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m @@ -95,7 +95,7 @@ growingTextView.backgroundColor = [UIColor clearColor]; growingTextView.font = [UIFont systemFontOfSize:15]; - growingTextView.textColor = kRiotPrimaryTextColor; + growingTextView.textColor = RiotDesignValues.theme.textPrimaryColor; growingTextView.tintColor = RiotDesignValues.theme.tintColor; growingTextView.internalTextView.keyboardAppearance = RiotDesignValues.theme.keyboardAppearance; diff --git a/Riot/Modules/Rooms/DirectoryPicker/Views/DirectoryServerTableViewCell.m b/Riot/Modules/Rooms/DirectoryPicker/Views/DirectoryServerTableViewCell.m index 675c5b4d2..858fbddd0 100644 --- a/Riot/Modules/Rooms/DirectoryPicker/Views/DirectoryServerTableViewCell.m +++ b/Riot/Modules/Rooms/DirectoryPicker/Views/DirectoryServerTableViewCell.m @@ -29,7 +29,7 @@ { [super customizeTableViewCellRendering]; - self.descLabel.textColor = kRiotPrimaryTextColor; + self.descLabel.textColor = RiotDesignValues.theme.textPrimaryColor; } - (void)layoutSubviews diff --git a/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m b/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m index 8617b6c02..837c78a72 100644 --- a/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m +++ b/Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m @@ -132,13 +132,13 @@ static CGFloat const kTextFontSize = 15.0; { self.normalStringAttributes = @{ NSFontAttributeName: [UIFont systemFontOfSize:kTextFontSize], - NSForegroundColorAttributeName: kRiotPrimaryTextColor + NSForegroundColorAttributeName: RiotDesignValues.theme.textPrimaryColor }; self.emphasizeStringAttributes = @{ NSFontAttributeName: [UIFont systemFontOfSize:kTextFontSize weight:UIFontWeightBold], - NSForegroundColorAttributeName: kRiotPrimaryTextColor + NSForegroundColorAttributeName: RiotDesignValues.theme.textPrimaryColor }; } diff --git a/Riot/Modules/Settings/Language/LanguagePickerViewController.m b/Riot/Modules/Settings/Language/LanguagePickerViewController.m index fb325864e..908471381 100644 --- a/Riot/Modules/Settings/Language/LanguagePickerViewController.m +++ b/Riot/Modules/Settings/Language/LanguagePickerViewController.m @@ -114,7 +114,7 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath; { - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.detailTextLabel.textColor = kRiotSecondaryTextColor; cell.backgroundColor = RiotDesignValues.theme.backgroundColor; diff --git a/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m b/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m index 430eacf0d..9fb33b786 100644 --- a/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m +++ b/Riot/Modules/Settings/PhoneCountry/CountryPickerViewController.m @@ -118,7 +118,7 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath; { - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.detailTextLabel.textColor = kRiotSecondaryTextColor; cell.backgroundColor = RiotDesignValues.theme.backgroundColor; diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index c7e19c688..9a4391abf 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -955,30 +955,30 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); // Crypto information NSMutableAttributedString *cryptoInformationString = [[NSMutableAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"settings_crypto_device_name", @"Vector", nil) - attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor, + attributes:@{NSForegroundColorAttributeName : RiotDesignValues.theme.textPrimaryColor, NSFontAttributeName: [UIFont systemFontOfSize:17]}]; [cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:account.device.displayName ? account.device.displayName : @"" - attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor, + attributes:@{NSForegroundColorAttributeName : RiotDesignValues.theme.textPrimaryColor, NSFontAttributeName: [UIFont systemFontOfSize:17]}]]; [cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"settings_crypto_device_id", @"Vector", nil) - attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor, + attributes:@{NSForegroundColorAttributeName : RiotDesignValues.theme.textPrimaryColor, NSFontAttributeName: [UIFont systemFontOfSize:17]}]]; [cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:account.device.deviceId ? account.device.deviceId : @"" - attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor, + attributes:@{NSForegroundColorAttributeName : RiotDesignValues.theme.textPrimaryColor, NSFontAttributeName: [UIFont systemFontOfSize:17]}]]; [cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"settings_crypto_device_key", @"Vector", nil) - attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor, + attributes:@{NSForegroundColorAttributeName : RiotDesignValues.theme.textPrimaryColor, NSFontAttributeName: [UIFont systemFontOfSize:17]}]]; NSString *fingerprint = account.mxSession.crypto.deviceEd25519Key; [cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:fingerprint ? fingerprint : @"" - attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor, + attributes:@{NSForegroundColorAttributeName : RiotDesignValues.theme.textPrimaryColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:17]}]]; return cryptoInformationString; @@ -1295,7 +1295,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); cell.mxkTextFieldLeadingConstraint.constant = 16; cell.mxkTextFieldTrailingConstraint.constant = 15; - cell.mxkLabel.textColor = kRiotPrimaryTextColor; + cell.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.mxkTextField.userInteractionEnabled = YES; cell.mxkTextField.borderStyle = UITextBorderStyleNone; @@ -1322,7 +1322,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); cell.mxkLabelLeadingConstraint.constant = cell.separatorInset.left; cell.mxkSwitchTrailingConstraint.constant = 15; - cell.mxkLabel.textColor = kRiotPrimaryTextColor; + cell.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; [cell.mxkSwitch removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside]; @@ -1348,7 +1348,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); } cell.textLabel.accessibilityIdentifier = nil; cell.textLabel.font = [UIFont systemFontOfSize:17]; - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; return cell; } @@ -1357,7 +1357,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); { MXKTableViewCellWithTextView *textViewCell = [tableView dequeueReusableCellWithIdentifier:[MXKTableViewCellWithTextView defaultReuseIdentifier] forIndexPath:indexPath]; - textViewCell.mxkTextView.textColor = kRiotPrimaryTextColor; + textViewCell.mxkTextView.textColor = RiotDesignValues.theme.textPrimaryColor; textViewCell.mxkTextView.font = [UIFont systemFontOfSize:17]; textViewCell.mxkTextView.backgroundColor = [UIColor clearColor]; textViewCell.mxkTextViewLeadingConstraint.constant = tableView.separatorInset.left; @@ -1436,7 +1436,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); profileCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_profile_picture", @"Vector", nil); profileCell.accessibilityIdentifier=@"SettingsVCProfilPictureStaticText"; - profileCell.mxkLabel.textColor = kRiotPrimaryTextColor; + profileCell.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; // if the user defines a new avatar if (newAvatarImage) @@ -1796,7 +1796,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:language]; languageDescription = [languageDescription capitalizedStringWithLocale:locale]; - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.textLabel.text = NSLocalizedStringFromTable(@"settings_ui_language", @"Vector", nil); cell.detailTextLabel.text = languageDescription; @@ -1833,7 +1833,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); @"Vector", nil); - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.textLabel.text = NSLocalizedStringFromTable(@"settings_ui_theme", @"Vector", nil); cell.detailTextLabel.text = i18nTheme; @@ -1882,7 +1882,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[NSBundle mainBundle] preferredLocalizations][0]]; NSString *countryName = [local displayNameForKey:NSLocaleCountryCode value:countryCode]; - cell.textLabel.textColor = kRiotPrimaryTextColor; + cell.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; cell.textLabel.text = NSLocalizedStringFromTable(@"settings_contacts_phonebook_country", @"Vector", nil); cell.detailTextLabel.text = countryName; @@ -2334,7 +2334,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void); { // Customize label style UITableViewHeaderFooterView *tableViewHeaderFooterView = (UITableViewHeaderFooterView*)view; - tableViewHeaderFooterView.textLabel.textColor = kRiotPrimaryTextColor; + tableViewHeaderFooterView.textLabel.textColor = RiotDesignValues.theme.textPrimaryColor; tableViewHeaderFooterView.textLabel.font = [UIFont systemFontOfSize:15]; } } diff --git a/Riot/Modules/Settings/Views/DeviceView.m b/Riot/Modules/Settings/Views/DeviceView.m index 8a70e7aa7..01fc6c8cf 100644 --- a/Riot/Modules/Settings/Views/DeviceView.m +++ b/Riot/Modules/Settings/Views/DeviceView.m @@ -30,7 +30,7 @@ self.containerView.backgroundColor = RiotDesignValues.theme.headerBackgroundColor; self.textView.backgroundColor = RiotDesignValues.theme.backgroundColor; - self.defaultTextColor = kRiotPrimaryTextColor; + self.defaultTextColor = RiotDesignValues.theme.textPrimaryColor; self.cancelButton.tintColor = RiotDesignValues.theme.tintColor; self.deleteButton.tintColor = RiotDesignValues.theme.tintColor; self.renameButton.tintColor = RiotDesignValues.theme.tintColor; diff --git a/Riot/Modules/Settings/Views/TableViewCellWithPhoneNumberTextField.m b/Riot/Modules/Settings/Views/TableViewCellWithPhoneNumberTextField.m index 3f9d7e012..6476e51a9 100644 --- a/Riot/Modules/Settings/Views/TableViewCellWithPhoneNumberTextField.m +++ b/Riot/Modules/Settings/Views/TableViewCellWithPhoneNumberTextField.m @@ -17,6 +17,7 @@ #import "TableViewCellWithPhoneNumberTextField.h" #import "RiotDesignValues.h" +#import "Riot-Swift.h" #import "NBPhoneNumberUtil.h" @@ -26,10 +27,10 @@ { [super customizeTableViewCellRendering]; - self.mxkLabel.textColor = kRiotPrimaryTextColor; - self.mxkTextField.textColor = kRiotPrimaryTextColor; + self.mxkLabel.textColor = RiotDesignValues.theme.textPrimaryColor; + self.mxkTextField.textColor = RiotDesignValues.theme.textPrimaryColor; - _isoCountryCodeLabel.textColor = kRiotPrimaryTextColor; + _isoCountryCodeLabel.textColor = RiotDesignValues.theme.textPrimaryColor; } - (void)setIsoCountryCode:(NSString *)isoCountryCode diff --git a/Riot/Modules/UserDevices/Views/DeviceTableViewCell.m b/Riot/Modules/UserDevices/Views/DeviceTableViewCell.m index bf79becc5..7b3f42e3b 100644 --- a/Riot/Modules/UserDevices/Views/DeviceTableViewCell.m +++ b/Riot/Modules/UserDevices/Views/DeviceTableViewCell.m @@ -32,7 +32,7 @@ { [super customizeTableViewCellRendering]; - self.deviceName.textColor = kRiotPrimaryTextColor; + self.deviceName.textColor = RiotDesignValues.theme.textPrimaryColor; [self.verifyButton.layer setCornerRadius:5]; self.verifyButton.clipsToBounds = YES; diff --git a/Riot/Utils/EventFormatter.m b/Riot/Utils/EventFormatter.m index 7427285de..c1d8a65ac 100644 --- a/Riot/Utils/EventFormatter.m +++ b/Riot/Utils/EventFormatter.m @@ -217,7 +217,7 @@ NSString *const kEventFormatterOnReRequestKeysLinkActionSeparator = @"/"; font-size: small; \ }", (unsigned long)bgColor]; - self.defaultTextColor = kRiotPrimaryTextColor; + self.defaultTextColor = RiotDesignValues.theme.textPrimaryColor; self.subTitleTextColor = kRiotSecondaryTextColor; self.prefixTextColor = kRiotSecondaryTextColor; self.bingTextColor = RiotDesignValues.theme.notificationMentionColor;