Refine theme.

pull/1/head
Matthew Chen 7 years ago
parent 931562de33
commit a543cd5a4e

@ -40,6 +40,9 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = Theme.backgroundColor;
self.title = NSLocalizedString(@"LINKED_DEVICES_TITLE", @"Menu item and navbar title for the device manager");
self.isExpectingMoreDevices = NO;
@ -301,13 +304,13 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == OWSLinkedDevicesTableViewControllerSectionAddDevice) {
UITableViewCell *addNewDeviceCell =
[tableView dequeueReusableCellWithIdentifier:@"AddNewDevice" forIndexPath:indexPath];
addNewDeviceCell.textLabel.text
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AddNewDevice" forIndexPath:indexPath];
[OWSTableItem configureCell:cell];
cell.textLabel.text
= NSLocalizedString(@"LINK_NEW_DEVICE_TITLE", @"Navigation title when scanning QR code to add new device.");
addNewDeviceCell.detailTextLabel.text
cell.detailTextLabel.text
= NSLocalizedString(@"LINK_NEW_DEVICE_SUBTITLE", @"Subheading for 'Link New Device' navigation");
return addNewDeviceCell;
return cell;
} else if (indexPath.section == OWSLinkedDevicesTableViewControllerSectionExistingDevices) {
OWSDeviceTableViewCell *cell =
[tableView dequeueReusableCellWithIdentifier:@"ExistingDevice" forIndexPath:indexPath];

@ -18,8 +18,9 @@ import SignalServiceKit
// Font config
nameLabel.font = .ows_dynamicTypeBody
nameLabel.textColor = Theme.primaryColor
subtitleLabel.font = UIFont.ows_regularFont(withSize: 11.0)
subtitleLabel.textColor = UIColor.ows_darkGray
subtitleLabel.textColor = Theme.secondaryColor
// Layout
@ -45,6 +46,8 @@ import SignalServiceKit
@objc
public func configure(thread: TSGroupThread, contactsManager: OWSContactsManager) {
OWSTableItem.configureCell(self)
if let groupName = thread.groupModel.groupName, !groupName.isEmpty {
self.nameLabel.text = groupName
} else {

@ -1,7 +1,11 @@
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSDeviceTableViewCell.h"
#import "DateUtil.h"
#import <SignalMessaging/OWSTableViewController.h>
#import <SignalMessaging/Theme.h>
NS_ASSUME_NONNULL_BEGIN
@ -9,6 +13,14 @@ NS_ASSUME_NONNULL_BEGIN
- (void)configureWithDevice:(OWSDevice *)device
{
OWSAssert(device);
[OWSTableItem configureCell:self];
self.nameLabel.textColor = Theme.primaryColor;
self.linkedLabel.textColor = Theme.secondaryColor;
self.lastSeenLabel.textColor = Theme.secondaryColor;
self.nameLabel.text = device.displayName;
NSString *linkedFormatString

@ -111,6 +111,7 @@ const CGFloat kOWSTable_DefaultCellHeight = 45.f;
cell.contentView.backgroundColor = [Theme backgroundColor];
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f];
cell.textLabel.textColor = [Theme primaryColor];
cell.detailTextLabel.textColor = [Theme secondaryColor];
UIView *selectedBackgroundView = [UIView new];
selectedBackgroundView.backgroundColor = [Theme.cellSelectedColor colorWithAlphaComponent:0.08];

@ -109,7 +109,7 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
+ (UIColor *)conversationButtonBackgroundColor
{
return (Theme.isDarkThemeEnabled ? UIColor.ows_dark05Color : UIColor.ows_light02Color);
return (Theme.isDarkThemeEnabled ? [UIColor colorWithWhite:0.3f alpha:1.f] : UIColor.ows_light02Color);
}
#pragma mark -

Loading…
Cancel
Save