Theme review.

pull/1/head
Matthew Chen 7 years ago
parent ccc77511f6
commit 4ea5d9b849

@ -48,6 +48,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
self.isExpectingMoreDevices = NO;
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 60;
self.tableView.separatorColor = Theme.hairlineColor;
[self.tableView applyScrollViewInsetsFix];

@ -96,6 +96,7 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
self.view = UIView()
let tableView = UITableView()
self.tableView = tableView
self.tableView.separatorColor = Theme.hairlineColor
view.addSubview(tableView)
tableView.autoPinEdgesToSuperviewEdges()

@ -60,6 +60,7 @@ class ConversationSearchViewController: UITableViewController {
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 60
tableView.separatorColor = Theme.hairlineColor
tableView.register(EmptySearchResultCell.self, forCellReuseIdentifier: EmptySearchResultCell.reuseIdentifier)
tableView.register(HomeViewCell.self, forCellReuseIdentifier: HomeViewCell.cellReuseIdentifier())

@ -318,6 +318,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.separatorColor = Theme.hairlineColor;
[self.tableView registerClass:[HomeViewCell class] forCellReuseIdentifier:HomeViewCell.cellReuseIdentifier];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kArchivedConversationsReuseIdentifier];
[self.view addSubview:self.tableView];

@ -225,8 +225,8 @@ 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 = Theme.secondaryColor
divider.autoSetDimension(.height, toSize: 0.5)
divider.backgroundColor = Theme.hairlineColor
divider.autoSetDimension(.height, toSize: CGHairlineWidth())
groupRows.append(divider)
}

@ -30,9 +30,9 @@ public class ContactFieldView: UIView {
return
}
let row = UIView()
row.backgroundColor = Theme.secondaryColor
row.backgroundColor = Theme.hairlineColor
self.addSubview(row)
row.autoSetDimension(.height, toSize: 1)
row.autoSetDimension(.height, toSize: CGHairlineWidth())
row.autoPinLeadingToSuperviewMargin(withInset: hMargin)
row.autoPinTrailingToSuperviewMargin()
row.autoPinEdge(.top, to: .bottom, of: prevRow, withOffset: 0)

@ -721,6 +721,7 @@ NSString *const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
self.view.backgroundColor = Theme.backgroundColor;
self.tableView.backgroundColor = Theme.backgroundColor;
self.tableView.separatorColor = Theme.hairlineColor;
}
@end

@ -28,6 +28,8 @@ extern NSString *const ThemeDidChangeNotification;
@property (class, readonly, nonatomic) UIColor *boldColor;
@property (class, readonly, nonatomic) UIColor *offBackgroundColor;
@property (class, readonly, nonatomic) UIColor *middleGrayColor;
@property (class, readonly, nonatomic) UIColor *placeholderColor;
@property (class, readonly, nonatomic) UIColor *hairlineColor;
#pragma mark - Global App Colors

@ -64,14 +64,12 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
+ (UIColor *)primaryColor
{
// TODO: Theme, Review with design.
return (Theme.isDarkThemeEnabled ? UIColor.ows_whiteColor : UIColor.ows_light90Color);
return (Theme.isDarkThemeEnabled ? UIColor.ows_dark05Color : UIColor.ows_light90Color);
}
+ (UIColor *)secondaryColor
{
// TODO: Theme, Review with design.
return (Theme.isDarkThemeEnabled ? UIColor.ows_dark60Color : UIColor.ows_light60Color);
return (Theme.isDarkThemeEnabled ? UIColor.ows_dark30Color : UIColor.ows_light60Color);
}
+ (UIColor *)boldColor
@ -86,6 +84,16 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
return [UIColor colorWithWhite:0.5f alpha:1.f];
}
+ (UIColor *)placeholderColor
{
return (Theme.isDarkThemeEnabled ? UIColor.ows_light35Color : UIColor.ows_dark55Color);
}
+ (UIColor *)hairlineColor
{
return (Theme.isDarkThemeEnabled ? UIColor.ows_light45Color : UIColor.ows_dark60Color);
}
#pragma mark - Global App Colors
+ (UIColor *)navbarBackgroundColor
@ -101,8 +109,7 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
+ (UIColor *)navbarTitleColor
{
// TODO: Theme, Review with design.
return (Theme.isDarkThemeEnabled ? UIColor.ows_dark60Color : UIColor.ows_light60Color);
return Theme.primaryColor;
}
+ (UIColor *)toolbarBackgroundColor

@ -143,7 +143,10 @@ public class ConversationStyle: NSObject {
return color
}
private static let defaultBubbleColorIncoming = UIColor.ows_messageBubbleLightGray
@objc
private static var defaultBubbleColorIncoming: UIColor {
return Theme.isDarkThemeEnabled ? UIColor.ows_dark70 : UIColor.ows_messageBubbleLightGray
}
@objc
public let bubbleColorOutgoingFailed = UIColor.ows_darkSkyBlue
@ -189,7 +192,11 @@ public class ConversationStyle: NSObject {
}
@objc
public static var bubbleTextColorIncoming = UIColor.ows_light90
public static var bubbleTextColorIncoming: UIColor {
return Theme.isDarkThemeEnabled ? UIColor.ows_white : UIColor.ows_light90
}
@objc
public static var bubbleTextColorOutgoing = UIColor.ows_white
@objc

Loading…
Cancel
Save