From ebd2e6d5ac2f5ec7bf752432819d8197f05144b9 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Thu, 9 Aug 2018 16:43:25 -0600 Subject: [PATCH] Tweak theme --- Signal/src/ViewControllers/ProfileViewController.m | 4 ++-- SignalMessaging/ViewControllers/OWSTableViewController.m | 2 +- SignalMessaging/categories/Theme.h | 1 + SignalMessaging/categories/Theme.m | 9 +++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Signal/src/ViewControllers/ProfileViewController.m b/Signal/src/ViewControllers/ProfileViewController.m index fc213acb2..88054771f 100644 --- a/Signal/src/ViewControllers/ProfileViewController.m +++ b/Signal/src/ViewControllers/ProfileViewController.m @@ -249,12 +249,12 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat if (lastRow == nameRow || lastRow == avatarRow) { UIView *separator = [UIView containerView]; - separator.backgroundColor = Theme.secondaryColor; + separator.backgroundColor = Theme.cellSeparatorColor; [contentView addSubview:separator]; [separator autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:lastRow withOffset:5.f]; [separator autoPinLeadingToSuperviewMarginWithInset:18.f]; [separator autoPinTrailingToSuperviewMarginWithInset:18.f]; - [separator autoSetDimension:ALDimensionHeight toSize:1.f]; + [separator autoSetDimension:ALDimensionHeight toSize:CGHairlineWidth()]; lastRow = separator; } } diff --git a/SignalMessaging/ViewControllers/OWSTableViewController.m b/SignalMessaging/ViewControllers/OWSTableViewController.m index 3fe752cfc..b0b12a0a3 100644 --- a/SignalMessaging/ViewControllers/OWSTableViewController.m +++ b/SignalMessaging/ViewControllers/OWSTableViewController.m @@ -114,7 +114,7 @@ const CGFloat kOWSTable_DefaultCellHeight = 45.f; cell.detailTextLabel.textColor = [Theme secondaryColor]; UIView *selectedBackgroundView = [UIView new]; - selectedBackgroundView.backgroundColor = [Theme.cellSelectedColor colorWithAlphaComponent:0.08]; + selectedBackgroundView.backgroundColor = Theme.cellSelectedColor; cell.selectedBackgroundView = selectedBackgroundView; } diff --git a/SignalMessaging/categories/Theme.h b/SignalMessaging/categories/Theme.h index 302fe1456..50333f89e 100644 --- a/SignalMessaging/categories/Theme.h +++ b/SignalMessaging/categories/Theme.h @@ -40,6 +40,7 @@ extern NSString *const ThemeDidChangeNotification; @property (class, readonly, nonatomic) UIColor *conversationButtonBackgroundColor; @property (class, readonly, nonatomic) UIColor *cellSelectedColor; +@property (class, readonly, nonatomic) UIColor *cellSeparatorColor; #pragma mark - diff --git a/SignalMessaging/categories/Theme.m b/SignalMessaging/categories/Theme.m index c4e85e9e4..106e9d800 100644 --- a/SignalMessaging/categories/Theme.m +++ b/SignalMessaging/categories/Theme.m @@ -57,7 +57,7 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled"; + (UIColor *)offBackgroundColor { return ( - Theme.isDarkThemeEnabled ? [UIColor colorWithWhite:0.2f alpha:1.f] : [UIColor colorWithWhite:0.9f alpha:1.f]); + Theme.isDarkThemeEnabled ? [UIColor colorWithWhite:0.2f alpha:1.f] : [UIColor colorWithWhite:0.94f alpha:1.f]); } + (UIColor *)primaryColor @@ -110,7 +110,12 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled"; + (UIColor *)cellSelectedColor { - return (Theme.isDarkThemeEnabled ? UIColor.ows_whiteColor : UIColor.ows_blackColor); + return (Theme.isDarkThemeEnabled ? [UIColor colorWithWhite:0.2 alpha:1] : [UIColor colorWithWhite:0.92 alpha:1]); +} + ++ (UIColor *)cellSeparatorColor +{ + return [UIColor colorWithWhite:0.78f alpha:1]; } + (UIColor *)conversationButtonBackgroundColor