diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 43ad45c28..839f4641c 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -17,7 +17,7 @@ import UIKit /// Provide color constant values defined by the designer -/// https://app.zeplin.io/project/5b857c64b1747a2c472290da/screen/5bf2cc89a4a6973f47883c6e +/// https://app.zeplin.io/project/5c122fa790c5b4241ffa6be7/screen/5c619592daff2f1241d82e75 @objc protocol Theme { var backgroundColor: UIColor { get } @@ -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 } @@ -77,9 +77,6 @@ import UIKit /// Color to tint the search background image var matrixSearchBackgroundImageTintColor: UIColor { get } - - /// Color of separator (when table view is not used) - var separatorColor: UIColor { get } // MARK: - Customisation methods diff --git a/Riot/Managers/Theme/Themes/BlackTheme.swift b/Riot/Managers/Theme/Themes/BlackTheme.swift index 0a42eae34..74ea1d52e 100644 --- a/Riot/Managers/Theme/Themes/BlackTheme.swift +++ b/Riot/Managers/Theme/Themes/BlackTheme.swift @@ -20,6 +20,9 @@ class BlackTheme: DarkTheme { override init() { super.init() - self.backgroundColor = UIColor.black + self.backgroundColor = UIColor(rgb: 0x000000) + self.baseColor = UIColor(rgb: 0x060708) + self.headerBackgroundColor = UIColor(rgb: 0x090A0C) + self.headerBorderColor = UIColor(rgb: 0x0D0F12) } } diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index 51be91c26..cd57acefd 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -21,35 +21,36 @@ import UIKit @objcMembers class DarkTheme: NSObject, Theme { - var backgroundColor: UIColor = UIColor(rgb: 0x212224) + var backgroundColor: UIColor = UIColor(rgb: 0x181B21) - var baseColor: UIColor = UIColor(rgb: 0x292E37) - var baseTextPrimaryColor: UIColor = UIColor(rgb: 0xFFFFFF) - var baseTextSecondaryColor: UIColor = UIColor(rgb: 0xFFFFFF) + var baseColor: UIColor = UIColor(rgb: 0x15171B) + var baseTextPrimaryColor: UIColor = UIColor(rgb: 0xEDF3FF) + var baseTextSecondaryColor: UIColor = UIColor(rgb: 0xEDF3FF) - var searchBackgroundColor: UIColor = UIColor(rgb: 0x3E434B) - var searchTextColor: UIColor = UIColor(rgb: 0xACB3C2) + var searchBackgroundColor: UIColor = UIColor(rgb: 0x181B21) + var searchPlaceholderColor: UIColor = UIColor(rgb: 0x61708B) - var headerBackgroundColor: UIColor = UIColor(rgb: 0x303540) - var headerBorderColor: UIColor = UIColor(rgb: 0x2E2F31) - var headerTextPrimaryColor: UIColor = UIColor(rgb: 0x96A1B7) + var headerBackgroundColor: UIColor = UIColor(rgb: 0x181B21) + var headerBorderColor: UIColor = UIColor(rgb: 0x22262E) + var headerTextPrimaryColor: UIColor = UIColor(rgb: 0xA1B2D1) var headerTextSecondaryColor: UIColor = UIColor(rgb: 0xC8C8CD) - var textPrimaryColor: UIColor = UIColor(rgb: 0xFFFFFF) - var textSecondaryColor: UIColor = UIColor(rgb: 0xD8D8D8) + var textPrimaryColor: UIColor = UIColor(rgb: 0xEDF3FF) + var textSecondaryColor: UIColor = UIColor(rgb: 0xA1B2D1) - var tintColor: UIColor = UIColor(rgb: 0x7AC9A1) + var tintColor: UIColor = UIColor(rgb: 0x03B381) var unreadRoomIndentColor: UIColor = UIColor(rgb: 0x2E3648) + var lineBreakColor: UIColor = UIColor(rgb: 0x61708B) - var notificationSecondaryColor: UIColor = UIColor(rgb: 0x7AC9A1) - var notificationPrimaryColor: UIColor = UIColor(rgb: 0xF56679) + var noticeColor: UIColor = UIColor(rgb: 0xFF4B55) + var noticeSecondaryColor: UIColor = UIColor(rgb: 0x61708B) - var warningColor: UIColor = UIColor(rgb: 0xF56679) + var warningColor: UIColor = UIColor(rgb: 0xFF4B55) var avatarColors: [UIColor] = [ - UIColor(rgb: 0x7AC9A1), - UIColor(rgb: 0x76DDD7), - UIColor(rgb: 0x1E7DDC)] + UIColor(rgb: 0x03B381), + UIColor(rgb: 0x368BD6), + UIColor(rgb: 0xAC3BA8)] var statusBarStyle: UIStatusBarStyle = .lightContent var scrollBarStyle: UIScrollViewIndicatorStyle = .white @@ -59,7 +60,6 @@ class DarkTheme: NSObject, Theme { var selectedBackgroundColor: UIColor? = UIColor.black var overlayBackgroundColor: UIColor = UIColor(white: 0.7, alpha: 0.5) var matrixSearchBackgroundImageTintColor: UIColor = UIColor(rgb: 0x7E7E7E) - var separatorColor: UIColor = UIColor(rgb: 0x2E2F31) func applyStyle(onNavigationBar navigationBar: UINavigationBar) { navigationBar.tintColor = self.baseTextPrimaryColor; @@ -74,7 +74,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 b0470785b..3a14b3f95 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -23,33 +23,34 @@ class DefaultTheme: NSObject, Theme { var backgroundColor: UIColor = UIColor(rgb: 0xFFFFFF) - var baseColor: UIColor = UIColor(rgb: 0x2E3648) + var baseColor: UIColor = UIColor(rgb: 0x27303A) var baseTextPrimaryColor: UIColor = UIColor(rgb: 0xFFFFFF) var baseTextSecondaryColor: UIColor = UIColor(rgb: 0xFFFFFF) var searchBackgroundColor: UIColor = UIColor(rgb: 0xFFFFFF) - var searchTextColor: UIColor = UIColor(rgb: 0xACB3C2) + var searchPlaceholderColor: UIColor = UIColor(rgb: 0x61708B) - var headerBackgroundColor: UIColor = UIColor(rgb: 0xF1F5F8) - var headerBorderColor: UIColor = UIColor(rgb: 0xEAEEF2) - var headerTextPrimaryColor: UIColor = UIColor(rgb: 0x72708B) + var headerBackgroundColor: UIColor = UIColor(rgb: 0xF2F5F8) + var headerBorderColor: UIColor = UIColor(rgb: 0xE9EDF1) + var headerTextPrimaryColor: UIColor = UIColor(rgb: 0x61708B) var headerTextSecondaryColor: UIColor = UIColor(rgb: 0xC8C8CD) - var textPrimaryColor: UIColor = UIColor(rgb: 0x383838) + var textPrimaryColor: UIColor = UIColor(rgb: 0x2E2F32) var textSecondaryColor: UIColor = UIColor(rgb: 0x9E9E9E) - var tintColor: UIColor = UIColor(rgb: 0x7AC9A1) + var tintColor: UIColor = UIColor(rgb: 0x03B381) var unreadRoomIndentColor: UIColor = UIColor(rgb: 0x2E3648) + var lineBreakColor: UIColor = UIColor(rgb: 0xEEEFEF) - var notificationSecondaryColor: UIColor = UIColor(rgb: 0x7AC9A1) - var notificationPrimaryColor: UIColor = UIColor(rgb: 0xF56679) + var noticeColor: UIColor = UIColor(rgb: 0xFF4B55) + var noticeSecondaryColor: UIColor = UIColor(rgb: 0x61708B) - var warningColor: UIColor = UIColor(rgb: 0xF56679) + var warningColor: UIColor = UIColor(rgb: 0xFF4B55) var avatarColors: [UIColor] = [ - UIColor(rgb: 0x7AC9A1), - UIColor(rgb: 0x76DDD7), - UIColor(rgb: 0x1E7DDC)] + UIColor(rgb: 0x03B381), + UIColor(rgb: 0x368BD6), + UIColor(rgb: 0xAC3BA8)] var statusBarStyle: UIStatusBarStyle = .lightContent var scrollBarStyle: UIScrollViewIndicatorStyle = .default @@ -59,7 +60,6 @@ class DefaultTheme: NSObject, Theme { var selectedBackgroundColor: UIColor? = nil // Use the default selection color var overlayBackgroundColor: UIColor = UIColor(white: 0.7, alpha: 0.5) var matrixSearchBackgroundImageTintColor: UIColor = UIColor(rgb: 0xE7E7E7) - var separatorColor: UIColor = UIColor(rgb: 0xEAEEF2) func applyStyle(onNavigationBar navigationBar: UINavigationBar) { navigationBar.tintColor = self.baseTextPrimaryColor; @@ -74,7 +74,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..ac074b90a 100644 --- a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift +++ b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift @@ -147,7 +147,7 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { attributes: [.foregroundColor : theme.placeholderTextColor]) self.updatePassphraseAdditionalLabel() - self.formSeparatorView.backgroundColor = theme.separatorColor + self.formSeparatorView.backgroundColor = theme.lineBreakColor self.confirmPassphraseTitleLabel.textColor = theme.textPrimaryColor theme.applyStyle(onTextField: self.confirmPassphraseTextField) @@ -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/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift index 0e154c506..9f7ba38be 100644 --- a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift +++ b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift @@ -101,7 +101,7 @@ final class KeyBackupSetupRecoveryKeyViewController: UIViewController { self.recoveryKeyTitleLabel.textColor = theme.textPrimaryColor self.recoveryKeyLabel.textColor = theme.textPrimaryColor - self.separatorView.backgroundColor = theme.separatorColor + self.separatorView.backgroundColor = theme.lineBreakColor theme.applyStyle(onButton: self.makeCopyButton) 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 a1ed57167..4a4c71014 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -4216,11 +4216,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;