CR: rename colors

pull/1/head
Michael Kirk 7 years ago
parent 47a7114317
commit ff63c31dae

@ -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

@ -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

@ -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)

@ -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 -

@ -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;
}

@ -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;

@ -2,8 +2,8 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSMath.h"
#import "UIColor+OWS.h"
#import "OWSMath.h"
#import <SignalCoreKit/Cryptography.h>
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];
}

Loading…
Cancel
Save