diff --git a/Signal/src/ViewControllers/MessageDetailViewController.swift b/Signal/src/ViewControllers/MessageDetailViewController.swift index a58c03bd5..941b59bae 100644 --- a/Signal/src/ViewControllers/MessageDetailViewController.swift +++ b/Signal/src/ViewControllers/MessageDetailViewController.swift @@ -130,7 +130,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele // MARK: - Create Views private func createViews() { - view.backgroundColor = UIColor.white + view.backgroundColor = Theme.backgroundColor let scrollView = UIScrollView() self.scrollView = scrollView @@ -222,7 +222,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele // TODO: It'd be nice to inset these dividers from the edge of the screen. let addDivider = { let divider = UIView() - divider.backgroundColor = UIColor(white: 0.9, alpha: 1.0) + divider.backgroundColor = Theme.secondaryColor divider.autoSetDimension(.height, toSize: 0.5) groupRows.append(divider) } @@ -458,7 +458,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele private func nameLabel(text: String) -> UILabel { let label = UILabel() - label.textColor = UIColor.black + label.textColor = Theme.primaryColor label.font = UIFont.ows_mediumFont(withSize: 14) label.text = text label.setContentHuggingHorizontalHigh() @@ -467,7 +467,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele private func valueLabel(text: String) -> UILabel { let label = UILabel() - label.textColor = UIColor.black + label.textColor = Theme.primaryColor label.font = UIFont.ows_regularFont(withSize: 14) label.text = text label.setContentHuggingHorizontalLow() @@ -488,7 +488,7 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele if subtitle.count > 0 { let subtitleLabel = self.valueLabel(text: subtitle) - subtitleLabel.textColor = UIColor.ows_darkGray + subtitleLabel.textColor = Theme.secondaryColor row.addSubview(subtitleLabel) subtitleLabel.autoPinTrailingToSuperviewMargin() subtitleLabel.autoPinLeading(toTrailingEdgeOf: nameLabel, offset: 10) diff --git a/Signal/src/ViewControllers/OWS2FAReminderViewController.swift b/Signal/src/ViewControllers/OWS2FAReminderViewController.swift index 6a5b6c33a..dc1a563d7 100644 --- a/Signal/src/ViewControllers/OWS2FAReminderViewController.swift +++ b/Signal/src/ViewControllers/OWS2FAReminderViewController.swift @@ -35,7 +35,7 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat let view = UIView() self.view = view - view.backgroundColor = .white + view.backgroundColor = Theme.backgroundColor let pinEntryView = PinEntryView() self.pinEntryView = pinEntryView diff --git a/Signal/src/ViewControllers/ProfileViewController.m b/Signal/src/ViewControllers/ProfileViewController.m index 235bd2eea..a3cde9bc8 100644 --- a/Signal/src/ViewControllers/ProfileViewController.m +++ b/Signal/src/ViewControllers/ProfileViewController.m @@ -89,10 +89,11 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat - (void)createViews { - self.view.backgroundColor = [UIColor colorWithRGBHex:0xefeff4]; + self.view.backgroundColor + = (Theme.isDarkThemeEnabled ? [UIColor colorWithRGBHex:0x202020] : [UIColor colorWithRGBHex:0xefeff4]); UIView *contentView = [UIView containerView]; - contentView.backgroundColor = [UIColor whiteColor]; + contentView.backgroundColor = Theme.backgroundColor; [self.view addSubview:contentView]; [contentView autoPinToTopLayoutGuideOfViewController:self withInset:0]; [contentView autoPinWidthToSuperview]; @@ -111,7 +112,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat UILabel *nameLabel = [UILabel new]; nameLabel.text = NSLocalizedString( @"PROFILE_VIEW_PROFILE_NAME_FIELD", @"Label for the profile name field of the profile view."); - nameLabel.textColor = [UIColor blackColor]; + nameLabel.textColor = Theme.primaryColor; nameLabel.font = [UIFont ows_mediumFontWithSize:fontSizePoints]; [nameRow addSubview:nameLabel]; [nameLabel autoPinLeadingToSuperviewMargin]; @@ -149,7 +150,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat UILabel *avatarLabel = [UILabel new]; avatarLabel.text = NSLocalizedString( @"PROFILE_VIEW_PROFILE_AVATAR_FIELD", @"Label for the profile avatar field of the profile view."); - avatarLabel.textColor = [UIColor blackColor]; + avatarLabel.textColor = Theme.primaryColor; avatarLabel.font = [UIFont ows_mediumFontWithSize:fontSizePoints]; [avatarRow addSubview:avatarLabel]; [avatarLabel autoPinLeadingToSuperviewMargin]; @@ -183,7 +184,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat [rows addObject:infoRow]; UILabel *infoLabel = [UILabel new]; - infoLabel.textColor = [UIColor ows_darkGrayColor]; + infoLabel.textColor = Theme.secondaryColor; infoLabel.font = [UIFont ows_regularFontWithSize:11.f]; infoLabel.textAlignment = NSTextAlignmentCenter; NSMutableAttributedString *text = [NSMutableAttributedString new]; @@ -249,8 +250,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat if (lastRow == nameRow || lastRow == avatarRow) { UIView *separator = [UIView containerView]; - separator.backgroundColor = [UIColor colorWithWhite:0.9f alpha:1.f]; - [contentView addSubview:separator]; + separator.backgroundColor = Theme.secondaryColor [contentView addSubview:separator]; [separator autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:lastRow withOffset:5.f]; [separator autoPinLeadingToSuperviewMarginWithInset:18.f]; [separator autoPinTrailingToSuperviewMarginWithInset:18.f]; @@ -356,7 +356,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat } else { self.saveButton.enabled = NO; [self.saveButton - setBackgroundColorsWithUpColor:[[UIColor ows_signalBrandBlueColor] blendWithColor:[UIColor whiteColor] + setBackgroundColorsWithUpColor:[[UIColor ows_signalBrandBlueColor] blendWithColor:Theme.backgroundColor alpha:0.5f]]; } }