diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 2e5394af9..e576d7441 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -27,7 +27,7 @@ import UIKit var baseTextSecondaryColor: UIColor { get } var searchBackgroundColor: UIColor { get } - var searchTextColor: UIColor { get } + var searchPlaceholderColor: UIColor { get } var headerBackgroundColor: UIColor { get } var headerBorderColor: UIColor { get } @@ -41,10 +41,10 @@ import UIKit var unreadRoomIndentColor: UIColor { get } - /// Color for notifications for unread messages - var notificationSecondaryColor: UIColor { get } - /// Color for notifications for mention messages - var notificationPrimaryColor: UIColor { get } + var lineBreakColor: UIColor { get } + + var noticeColor: UIColor { get } + var noticeSecondaryColor: UIColor { get } /// Color for errors or warnings var warningColor: UIColor { get } diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index 6292bec3c..3dc3bf5f9 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -28,7 +28,7 @@ class DarkTheme: NSObject, Theme { var baseTextSecondaryColor: UIColor = UIColor(rgb: 0xEDF3FF) var searchBackgroundColor: UIColor = UIColor(rgb: 0x181B21) - var searchTextColor: UIColor = UIColor(rgb: 0x61708B) + var searchPlaceholderColor: UIColor = UIColor(rgb: 0x61708B) var headerBackgroundColor: UIColor = UIColor(rgb: 0x181B21) var headerBorderColor: UIColor = UIColor(rgb: 0x22262E) @@ -40,9 +40,10 @@ class DarkTheme: NSObject, Theme { var tintColor: UIColor = UIColor(rgb: 0x03B381) var unreadRoomIndentColor: UIColor = UIColor(rgb: 0x2E3648) + var lineBreakColor: UIColor = UIColor(rgb: 0x61708B) - var notificationSecondaryColor: UIColor = UIColor(rgb: 0x61708B) - var notificationPrimaryColor: UIColor = UIColor(rgb: 0xFF4B55) + var noticeColor: UIColor = UIColor(rgb: 0xFF4B55) + var noticeSecondaryColor: UIColor = UIColor(rgb: 0x61708B) var warningColor: UIColor = UIColor(rgb: 0xFF4B55) @@ -74,7 +75,7 @@ class DarkTheme: NSObject, Theme { func applyStyle(onSearchBar searchBar: UISearchBar) { searchBar.barStyle = .black - searchBar.tintColor = self.searchTextColor; + searchBar.tintColor = self.searchPlaceholderColor; searchBar.barTintColor = self.headerBackgroundColor; searchBar.layer.borderWidth = 1; searchBar.layer.borderColor = self.headerBorderColor.cgColor; diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index 4d01ce5d7..a521a6b28 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -28,7 +28,7 @@ class DefaultTheme: NSObject, Theme { var baseTextSecondaryColor: UIColor = UIColor(rgb: 0xFFFFFF) var searchBackgroundColor: UIColor = UIColor(rgb: 0xFFFFFF) - var searchTextColor: UIColor = UIColor(rgb: 0x61708B) // Name in the associated palette is Search Placeholder + var searchPlaceholderColor: UIColor = UIColor(rgb: 0x61708B) var headerBackgroundColor: UIColor = UIColor(rgb: 0xF2F5F8) var headerBorderColor: UIColor = UIColor(rgb: 0xE9EDF1) @@ -40,9 +40,10 @@ class DefaultTheme: NSObject, Theme { var tintColor: UIColor = UIColor(rgb: 0x03B381) var unreadRoomIndentColor: UIColor = UIColor(rgb: 0x2E3648) + var lineBreakColor: UIColor = UIColor(rgb: 0xEEEFEF) - var notificationSecondaryColor: UIColor = UIColor(rgb: 0x61708B) - var notificationPrimaryColor: UIColor = UIColor(rgb: 0xFF4B55) + var noticeColor: UIColor = UIColor(rgb: 0xFF4B55) + var noticeSecondaryColor: UIColor = UIColor(rgb: 0x61708B) var warningColor: UIColor = UIColor(rgb: 0xFF4B55) @@ -74,7 +75,7 @@ class DefaultTheme: NSObject, Theme { func applyStyle(onSearchBar searchBar: UISearchBar) { searchBar.barStyle = .default - searchBar.tintColor = self.searchTextColor; + searchBar.tintColor = self.searchPlaceholderColor; searchBar.barTintColor = self.headerBackgroundColor; searchBar.layer.borderWidth = 1; searchBar.layer.borderColor = self.headerBorderColor.cgColor; diff --git a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m index 7ab19dda2..4eb05500b 100644 --- a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m +++ b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m @@ -109,7 +109,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; if (0 < roomCellData.notificationCount) { - self.missedNotifAndUnreadIndicator.backgroundColor = roomCellData.highlightCount ? ThemeService.shared.theme.notificationPrimaryColor : ThemeService.shared.theme.notificationSecondaryColor; + self.missedNotifAndUnreadIndicator.backgroundColor = roomCellData.highlightCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor; self.missedNotifAndUnreadBadgeBgView.hidden = NO; self.missedNotifAndUnreadBadgeBgView.backgroundColor = self.missedNotifAndUnreadIndicator.backgroundColor; diff --git a/Riot/Modules/Communities/Views/GroupInviteTableViewCell.m b/Riot/Modules/Communities/Views/GroupInviteTableViewCell.m index 0152d8382..16fea90a2 100644 --- a/Riot/Modules/Communities/Views/GroupInviteTableViewCell.m +++ b/Riot/Modules/Communities/Views/GroupInviteTableViewCell.m @@ -58,7 +58,7 @@ NSString *const kGroupInviteTableViewCellRoomKey = @"kGroupInviteTableViewCellRo self.leftButton.backgroundColor = ThemeService.shared.riotColorBlue; self.rightButton.backgroundColor = ThemeService.shared.riotColorBlue; - self.noticeBadgeView.backgroundColor = ThemeService.shared.theme.notificationPrimaryColor; + self.noticeBadgeView.backgroundColor = ThemeService.shared.theme.noticeColor; } - (void)onDeclinePressed:(id)sender diff --git a/Riot/Modules/Home/Views/RoomCollectionViewCell.m b/Riot/Modules/Home/Views/RoomCollectionViewCell.m index 1d9cb0f54..d555ee4c9 100644 --- a/Riot/Modules/Home/Views/RoomCollectionViewCell.m +++ b/Riot/Modules/Home/Views/RoomCollectionViewCell.m @@ -126,7 +126,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; if (0 < roomCellData.notificationCount) { self.missedNotifAndUnreadBadgeBgView.hidden = NO; - self.missedNotifAndUnreadBadgeBgView.backgroundColor = roomCellData.highlightCount ? ThemeService.shared.theme.notificationPrimaryColor : ThemeService.shared.theme.notificationSecondaryColor; + self.missedNotifAndUnreadBadgeBgView.backgroundColor = roomCellData.highlightCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor; self.missedNotifAndUnreadBadgeLabel.text = roomCellData.notificationCountStringValue; [self.missedNotifAndUnreadBadgeLabel sizeToFit]; @@ -147,7 +147,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; else if (roomCellData.roomSummary.room.summary.membership == MXMembershipInvite) { self.missedNotifAndUnreadBadgeBgView.hidden = NO; - self.missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.notificationPrimaryColor; + self.missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.noticeColor; self.missedNotifAndUnreadBadgeLabel.text = @"!"; [self.missedNotifAndUnreadBadgeLabel sizeToFit]; diff --git a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift index 5f933f147..e66faad15 100644 --- a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift +++ b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift @@ -237,7 +237,7 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { textColor = self.theme.tintColor } else { text = VectorL10n.keyBackupSetupPassphrasePassphraseInvalid - textColor = self.theme.notificationPrimaryColor + textColor = self.theme.noticeColor } self.passphraseAdditionalLabel.text = text @@ -254,7 +254,7 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { textColor = self.theme.tintColor } else { text = VectorL10n.keyBackupSetupPassphraseConfirmPassphraseInvalid - textColor = self.theme.notificationPrimaryColor + textColor = self.theme.noticeColor } self.confirmPassphraseAdditionalLabel.text = text diff --git a/Riot/Modules/People/Views/InviteRecentTableViewCell.m b/Riot/Modules/People/Views/InviteRecentTableViewCell.m index 993ed2a89..b9a7de18b 100644 --- a/Riot/Modules/People/Views/InviteRecentTableViewCell.m +++ b/Riot/Modules/People/Views/InviteRecentTableViewCell.m @@ -63,7 +63,7 @@ NSString *const kInviteRecentTableViewCellRoomKey = @"kInviteRecentTableViewCell self.leftButton.backgroundColor = ThemeService.shared.theme.tintColor; self.rightButton.backgroundColor = ThemeService.shared.theme.tintColor; - self.noticeBadgeView.backgroundColor = ThemeService.shared.theme.notificationPrimaryColor; + self.noticeBadgeView.backgroundColor = ThemeService.shared.theme.noticeColor; } - (void)onDeclinePressed:(id)sender diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 88c18349e..ff76347df 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -4245,11 +4245,11 @@ // Set the right background color if (highlightCount) { - missedDiscussionsBadgeLabelBgView.backgroundColor = ThemeService.shared.theme.notificationPrimaryColor; + missedDiscussionsBadgeLabelBgView.backgroundColor = ThemeService.shared.theme.noticeColor; } else { - missedDiscussionsBadgeLabelBgView.backgroundColor = ThemeService.shared.theme.notificationSecondaryColor; + missedDiscussionsBadgeLabelBgView.backgroundColor = ThemeService.shared.theme.noticeSecondaryColor; } if (!missedDiscussionsButton || [leftBarButtonItems indexOfObject:missedDiscussionsButton] == NSNotFound) diff --git a/Riot/Modules/TabBar/MasterTabBarController.m b/Riot/Modules/TabBar/MasterTabBarController.m index 49a94f664..d926c8781 100644 --- a/Riot/Modules/TabBar/MasterTabBarController.m +++ b/Riot/Modules/TabBar/MasterTabBarController.m @@ -798,15 +798,15 @@ // Use a middle dot to signal missed notif in favourites [self setMissedDiscussionsMark:(recentsDataSource.missedFavouriteDiscussionsCount? @"\u00B7": nil) onTabBarItem:TABBAR_FAVOURITES_INDEX - withBadgeColor:(recentsDataSource.missedHighlightFavouriteDiscussionsCount ? ThemeService.shared.theme.notificationPrimaryColor : ThemeService.shared.theme.notificationSecondaryColor)]; + withBadgeColor:(recentsDataSource.missedHighlightFavouriteDiscussionsCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor)]; // Update the badge on People and Rooms tabs [self setMissedDiscussionsCount:recentsDataSource.missedDirectDiscussionsCount onTabBarItem:TABBAR_PEOPLE_INDEX - withBadgeColor:(recentsDataSource.missedHighlightDirectDiscussionsCount ? ThemeService.shared.theme.notificationPrimaryColor : ThemeService.shared.theme.notificationSecondaryColor)]; + withBadgeColor:(recentsDataSource.missedHighlightDirectDiscussionsCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor)]; [self setMissedDiscussionsCount:recentsDataSource.missedGroupDiscussionsCount onTabBarItem:TABBAR_ROOMS_INDEX - withBadgeColor:(recentsDataSource.missedHighlightGroupDiscussionsCount ? ThemeService.shared.theme.notificationPrimaryColor : ThemeService.shared.theme.notificationSecondaryColor)]; + withBadgeColor:(recentsDataSource.missedHighlightGroupDiscussionsCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor)]; } - (void)setMissedDiscussionsCount:(NSUInteger)count onTabBarItem:(NSUInteger)index withBadgeColor:(UIColor*)badgeColor diff --git a/Riot/Utils/EventFormatter.m b/Riot/Utils/EventFormatter.m index 8709609dd..44d3feac1 100644 --- a/Riot/Utils/EventFormatter.m +++ b/Riot/Utils/EventFormatter.m @@ -220,7 +220,7 @@ NSString *const kEventFormatterOnReRequestKeysLinkActionSeparator = @"/"; self.defaultTextColor = ThemeService.shared.theme.textPrimaryColor; self.subTitleTextColor = ThemeService.shared.theme.textSecondaryColor; self.prefixTextColor = ThemeService.shared.theme.textSecondaryColor; - self.bingTextColor = ThemeService.shared.theme.notificationPrimaryColor; + self.bingTextColor = ThemeService.shared.theme.noticeColor; self.encryptingTextColor = ThemeService.shared.theme.tintColor; self.sendingTextColor = ThemeService.shared.theme.textSecondaryColor; self.errorTextColor = ThemeService.shared.theme.warningColor;