diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m b/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m index 325d0f719..97fdbb408 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m @@ -27,8 +27,8 @@ NS_ASSUME_NONNULL_BEGIN self.delegate = self; - self.backgroundColor = [UIColor ows_light02Color]; - self.layer.borderColor = [UIColor.ows_blackColor colorWithAlphaComponent:0.12f].CGColor; + self.backgroundColor = (Theme.isDarkThemeEnabled ? UIColor.ows_dark95Color : UIColor.ows_light02Color); + self.layer.borderColor = [Theme.primaryColor colorWithAlphaComponent:0.12f].CGColor; self.layer.borderWidth = 0.5f; self.scrollIndicatorInsets = UIEdgeInsetsMake(4, 4, 4, 4); @@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN self.userInteractionEnabled = YES; self.font = [UIFont ows_dynamicTypeBodyFont]; - self.textColor = [UIColor blackColor]; + self.textColor = Theme.primaryColor; self.textAlignment = NSTextAlignmentNatural; self.contentMode = UIViewContentModeRedraw; @@ -48,7 +48,8 @@ NS_ASSUME_NONNULL_BEGIN self.placeholderView = [UILabel new]; self.placeholderView.text = NSLocalizedString(@"new_message", @""); - self.placeholderView.textColor = UIColor.ows_light35Color; + self.placeholderView.textColor + = (Theme.isDarkThemeEnabled ? UIColor.ows_dark55Color : UIColor.ows_light35Color); self.placeholderView.userInteractionEnabled = NO; [self addSubview:self.placeholderView]; diff --git a/Signal/src/ViewControllers/ConversationView/ConversationScrollButton.m b/Signal/src/ViewControllers/ConversationView/ConversationScrollButton.m index 3570c4224..4e551036d 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationScrollButton.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationScrollButton.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// Copyright (c) 2018 Open Whisper Systems. All rights reserved. // #import "ConversationScrollButton.h" @@ -54,7 +54,6 @@ NS_ASSUME_NONNULL_BEGIN const CGFloat circleSize = self.class.circleSize; UIView *circleView = [UIView new]; self.circleView = circleView; - circleView.backgroundColor = [UIColor colorWithWhite:0.95f alpha:1.f]; circleView.userInteractionEnabled = NO; circleView.layer.cornerRadius = circleSize * 0.5f; circleView.layer.shadowColor = [UIColor colorWithWhite:0.5f alpha:1.f].CGColor; @@ -81,17 +80,28 @@ NS_ASSUME_NONNULL_BEGIN - (void)updateColors { + UIColor *foregroundColor; + UIColor *backgroundColor; + if (self.hasUnreadMessages) { + foregroundColor = UIColor.whiteColor; + backgroundColor = UIColor.ows_materialBlueColor; + } else if (Theme.isDarkThemeEnabled) { + foregroundColor = UIColor.ows_materialBlueColor; + backgroundColor = [UIColor colorWithWhite:0.25f alpha:1.f]; + } else { + foregroundColor = UIColor.ows_materialBlueColor; + backgroundColor = [UIColor colorWithWhite:0.95f alpha:1.f]; + } + const CGFloat circleSize = self.class.circleSize; - self.circleView.backgroundColor - = (self.hasUnreadMessages ? [UIColor ows_materialBlueColor] : [UIColor colorWithWhite:0.95f alpha:1.f]); - self.iconLabel.attributedText = [[NSAttributedString alloc] - initWithString:self.iconText - attributes:@{ - NSFontAttributeName : [UIFont ows_fontAwesomeFont:circleSize * 0.8f], - NSForegroundColorAttributeName : - (self.hasUnreadMessages ? [UIColor whiteColor] : [UIColor ows_materialBlueColor]), - NSBaselineOffsetAttributeName : @(-0.5f), - }]; + self.circleView.backgroundColor = backgroundColor; + self.iconLabel.attributedText = + [[NSAttributedString alloc] initWithString:self.iconText + attributes:@{ + NSFontAttributeName : [UIFont ows_fontAwesomeFont:circleSize * 0.8f], + NSForegroundColorAttributeName : foregroundColor, + NSBaselineOffsetAttributeName : @(-0.5f), + }]; } @end diff --git a/Signal/src/ViewControllers/CropScaleImageViewController.swift b/Signal/src/ViewControllers/CropScaleImageViewController.swift index bd47d2757..23cdc2f79 100644 --- a/Signal/src/ViewControllers/CropScaleImageViewController.swift +++ b/Signal/src/ViewControllers/CropScaleImageViewController.swift @@ -141,8 +141,6 @@ import SignalMessaging override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = UIColor.white - createViews() } @@ -150,6 +148,8 @@ import SignalMessaging private func createViews() { + view.backgroundColor = UIColor.black + let contentView = UIView() contentView.backgroundColor = UIColor.black self.view.addSubview(contentView)