diff --git a/Signal/src/ViewControllers/MediaGalleryViewController.swift b/Signal/src/ViewControllers/MediaGalleryViewController.swift index 5097252b6..82b3d1859 100644 --- a/Signal/src/ViewControllers/MediaGalleryViewController.swift +++ b/Signal/src/ViewControllers/MediaGalleryViewController.swift @@ -277,9 +277,9 @@ class MediaGalleryNavigationController: OWSNavigationController { navigationBar.respectsTheme = false navigationBar.barStyle = .black - navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: Theme.galleryIconColor] - navigationBar.barTintColor = Theme.galleryBackgroundColor.withAlphaComponent(0.6) - navigationBar.tintColor = Theme.galleryIconColor + navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: Theme.darkThemePrimaryColor] + navigationBar.barTintColor = Theme.darkThemeBackgroundColor.withAlphaComponent(0.6) + navigationBar.tintColor = Theme.darkThemePrimaryColor } override func viewDidAppear(_ animated: Bool) { @@ -450,7 +450,7 @@ class MediaGallery: NSObject, MediaGalleryDataSource, MediaTileViewControllerDel // fade out content behind the pageViewController // and behind the presentation view - self.navigationController.view.backgroundColor = Theme.galleryBackgroundColor + self.navigationController.view.backgroundColor = Theme.darkThemeBackgroundColor }, completion: { (_: Bool) in // At this point our presentation view should be overlayed perfectly diff --git a/Signal/src/ViewControllers/MediaPageViewController.swift b/Signal/src/ViewControllers/MediaPageViewController.swift index 16efbc121..17d2e42bf 100644 --- a/Signal/src/ViewControllers/MediaPageViewController.swift +++ b/Signal/src/ViewControllers/MediaPageViewController.swift @@ -152,7 +152,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou // Views - view.backgroundColor = Theme.galleryBackgroundColor + view.backgroundColor = Theme.darkThemeBackgroundColor captionContainerView.delegate = self updateCaptionContainerVisibility() @@ -271,7 +271,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou let shareBarButton: UIBarButtonItem = { let shareBarButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(didPressShare)) - shareBarButton.tintColor = Theme.galleryIconColor + shareBarButton.tintColor = Theme.darkThemePrimaryColor return shareBarButton }() @@ -279,7 +279,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou let deleteBarButton = UIBarButtonItem(barButtonSystemItem: .trash, target: self, action: #selector(didPressDelete)) - deleteBarButton.tintColor = Theme.galleryIconColor + deleteBarButton.tintColor = Theme.darkThemePrimaryColor return deleteBarButton }() @@ -289,14 +289,14 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou var videoPlayBarButton: UIBarButtonItem = { let videoPlayBarButton = UIBarButtonItem(barButtonSystemItem: .play, target: self, action: #selector(didPressPlayBarButton)) - videoPlayBarButton.tintColor = Theme.galleryIconColor + videoPlayBarButton.tintColor = Theme.darkThemePrimaryColor return videoPlayBarButton }() let videoPauseBarButton: UIBarButtonItem = { let videoPauseBarButton = UIBarButtonItem(barButtonSystemItem: .pause, target: self, action: #selector(didPressPauseBarButton)) - videoPauseBarButton.tintColor = Theme.galleryIconColor + videoPauseBarButton.tintColor = Theme.darkThemePrimaryColor return videoPauseBarButton }() @@ -678,7 +678,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou lazy private var portraitHeaderNameLabel: UILabel = { let label = UILabel() - label.textColor = Theme.galleryIconColor + label.textColor = Theme.darkThemePrimaryColor label.font = UIFont.ows_regularFont(withSize: 17) label.textAlignment = .center label.adjustsFontSizeToFitWidth = true @@ -689,7 +689,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou lazy private var portraitHeaderDateLabel: UILabel = { let label = UILabel() - label.textColor = Theme.galleryIconColor + label.textColor = Theme.darkThemePrimaryColor label.font = UIFont.ows_regularFont(withSize: 12) label.textAlignment = .center label.adjustsFontSizeToFitWidth = true diff --git a/Signal/src/ViewControllers/MediaTileViewController.swift b/Signal/src/ViewControllers/MediaTileViewController.swift index b2b58297c..2f9acb261 100644 --- a/Signal/src/ViewControllers/MediaTileViewController.swift +++ b/Signal/src/ViewControllers/MediaTileViewController.swift @@ -66,7 +66,7 @@ public class MediaTileViewController: UICollectionViewController, MediaGalleryDa return } - collectionView.backgroundColor = Theme.galleryBackgroundColor + collectionView.backgroundColor = Theme.darkThemeBackgroundColor collectionView.register(PhotoGridViewCell.self, forCellWithReuseIdentifier: PhotoGridViewCell.reuseIdentifier) collectionView.register(MediaGallerySectionHeader.self, forSupplementaryViewOfKind: UICollectionElementKindSectionHeader, withReuseIdentifier: MediaGallerySectionHeader.reuseIdentifier) diff --git a/SignalMessaging/appearance/Theme.h b/SignalMessaging/appearance/Theme.h index 42e0a94cb..580825752 100644 --- a/SignalMessaging/appearance/Theme.h +++ b/SignalMessaging/appearance/Theme.h @@ -39,8 +39,8 @@ extern NSString *const ThemeDidChangeNotification; @property (class, readonly, nonatomic) UIColor *cellSelectedColor; @property (class, readonly, nonatomic) UIColor *cellSeparatorColor; -@property (class, readonly, nonatomic) UIColor *galleryBackgroundColor; -@property (class, readonly, nonatomic) UIColor *galleryIconColor; +@property (class, readonly, nonatomic) UIColor *darkThemeBackgroundColor; +@property (class, readonly, nonatomic) UIColor *darkThemePrimaryColor; #pragma mark - diff --git a/SignalMessaging/appearance/Theme.m b/SignalMessaging/appearance/Theme.m index 7afe212a2..f9e523c83 100644 --- a/SignalMessaging/appearance/Theme.m +++ b/SignalMessaging/appearance/Theme.m @@ -47,7 +47,7 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled"; + (UIColor *)backgroundColor { - return (Theme.isDarkThemeEnabled ? UIColor.ows_gray95Color : UIColor.ows_whiteColor); + return (Theme.isDarkThemeEnabled ? Theme.darkThemeBackgroundColor : UIColor.ows_whiteColor); } + (UIColor *)offBackgroundColor @@ -58,7 +58,7 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled"; + (UIColor *)primaryColor { - return (Theme.isDarkThemeEnabled ? UIColor.ows_gray05Color : UIColor.ows_gray90Color); + return (Theme.isDarkThemeEnabled ? Theme.darkThemePrimaryColor : UIColor.ows_gray90Color); } + (UIColor *)secondaryColor @@ -118,12 +118,12 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled"; return Theme.hairlineColor; } -+ (UIColor *)galleryBackgroundColor ++ (UIColor *)darkThemeBackgroundColor { return UIColor.ows_gray95Color; } -+ (UIColor *)galleryIconColor ++ (UIColor *)darkThemePrimaryColor { return UIColor.ows_gray05Color; } diff --git a/SignalMessaging/categories/UIColor+OWS.h b/SignalMessaging/categories/UIColor+OWS.h index febd1fd80..7aece5c18 100644 --- a/SignalMessaging/categories/UIColor+OWS.h +++ b/SignalMessaging/categories/UIColor+OWS.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @property (class, readonly, nonatomic) UIColor *ows_materialBlueColor; @property (class, readonly, nonatomic) UIColor *ows_destructiveRedColor; @property (class, readonly, nonatomic) UIColor *ows_fadedBlueColor; -@property (class, readonly, nonatomic) UIColor *ows_darkBackgroundColor; +@property (class, readonly, nonatomic) UIColor *ows_darkThemeBackgroundColor; @property (class, readonly, nonatomic) UIColor *ows_darkGrayColor; @property (class, readonly, nonatomic) UIColor *ows_yellowColor; @property (class, readonly, nonatomic) UIColor *ows_reminderYellowColor; diff --git a/SignalMessaging/categories/UIColor+OWS.m b/SignalMessaging/categories/UIColor+OWS.m index 660ae3261..ae0bc3e18 100644 --- a/SignalMessaging/categories/UIColor+OWS.m +++ b/SignalMessaging/categories/UIColor+OWS.m @@ -2,8 +2,8 @@ // Copyright (c) 2018 Open Whisper Systems. All rights reserved. // -#import "OWSMath.h" #import "UIColor+OWS.h" +#import "OWSMath.h" #import NS_ASSUME_NONNULL_BEGIN @@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN return [UIColor colorWithRed:81.f / 255.f green:81.f / 255.f blue:81.f / 255.f alpha:1.f]; } -+ (UIColor *)ows_darkBackgroundColor ++ (UIColor *)ows_darkThemeBackgroundColor { return [UIColor colorWithRed:35.f / 255.f green:31.f / 255.f blue:32.f / 255.f alpha:1.f]; }