From 22dda476bb782cd84ec28e429494b3a669b2d94a Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 15 Aug 2018 16:29:13 -0400 Subject: [PATCH] Fix QA issues in theme. --- .../AppSettings/AppSettingsViewController.m | 1 - Signal/src/ViewControllers/NewGroupViewController.m | 10 +++++++--- .../ViewControllers/CountryCodeViewController.m | 10 ++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m b/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m index 8cf20960e..c99e350af 100644 --- a/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m +++ b/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m @@ -143,7 +143,6 @@ cell.textLabel.text = NSLocalizedString(@"NETWORK_STATUS_HEADER", @""); cell.selectionStyle = UITableViewCellSelectionStyleNone; UILabel *accessoryLabel = [UILabel new]; - accessoryLabel.font = [UIFont ows_regularFontWithSize:18.f]; if (TSAccountManager.sharedInstance.isDeregistered) { accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_DEREGISTERED", @"Error indicating that this device is no longer registered."); diff --git a/Signal/src/ViewControllers/NewGroupViewController.m b/Signal/src/ViewControllers/NewGroupViewController.m index 2ca4306cf..03c5e08ac 100644 --- a/Signal/src/ViewControllers/NewGroupViewController.m +++ b/Signal/src/ViewControllers/NewGroupViewController.m @@ -157,10 +157,14 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68; UITextField *groupNameTextField = [UITextField new]; _groupNameTextField = groupNameTextField; - groupNameTextField.textColor = [Theme primaryColor]; + groupNameTextField.textColor = Theme.primaryColor; groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font]; - groupNameTextField.placeholder - = NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @"Placeholder text for group name field"); + groupNameTextField.attributedPlaceholder = + [[NSAttributedString alloc] initWithString:NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", + @"Placeholder text for group name field") + attributes:@{ + NSForegroundColorAttributeName : Theme.secondaryColor, + }]; groupNameTextField.delegate = self; [groupNameTextField addTarget:self action:@selector(groupNameDidChange:) diff --git a/SignalMessaging/ViewControllers/CountryCodeViewController.m b/SignalMessaging/ViewControllers/CountryCodeViewController.m index c16039d17..216a5bbfc 100644 --- a/SignalMessaging/ViewControllers/CountryCodeViewController.m +++ b/SignalMessaging/ViewControllers/CountryCodeViewController.m @@ -50,7 +50,10 @@ searchBar.searchBarStyle = UISearchBarStyleMinimal; searchBar.delegate = self; searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @""); - searchBar.backgroundColor = [UIColor whiteColor]; + searchBar.backgroundColor = Theme.searchBarBackgroundColor; + searchBar.barStyle = Theme.barStyle; + searchBar.searchBarStyle = Theme.searchBarStyle; + searchBar.barTintColor = Theme.backgroundColor; [searchBar sizeToFit]; self.tableView.tableHeaderView = searchBar; @@ -76,14 +79,13 @@ [section addItem:[OWSTableItem itemWithCustomCellBlock:^{ UITableViewCell *cell = [OWSTableItem newCell]; + [OWSTableItem configureCell:cell]; cell.textLabel.text = [PhoneNumberUtil countryNameFromCountryCode:countryCode]; - cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; - cell.textLabel.textColor = [UIColor blackColor]; UILabel *countryCodeLabel = [UILabel new]; countryCodeLabel.text = [PhoneNumberUtil callingCodeFromCountryCode:countryCode]; countryCodeLabel.font = [UIFont ows_regularFontWithSize:16.f]; - countryCodeLabel.textColor = [UIColor ows_darkGrayColor]; + countryCodeLabel.textColor = Theme.secondaryColor; [countryCodeLabel sizeToFit]; cell.accessoryView = countryCodeLabel;