Refine theme.

pull/1/head
Matthew Chen 7 years ago
parent 7759c9ca0f
commit 581347a7fb

@ -96,6 +96,11 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
override open func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = Theme.backgroundColor
self.tableView.backgroundColor = Theme.backgroundColor
self.searchBar.backgroundColor = Theme.backgroundColor
self.searchBar.barStyle = Theme.barStyle()
searchBar.placeholder = NSLocalizedString("INVITE_FRIENDS_PICKER_SEARCHBAR_PLACEHOLDER", comment: "Search")
// Prevent content from going under the navigation bar
self.edgesForExtendedLayout = []
@ -231,6 +236,7 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
owsFail("\(logTag) in \(#function) cell had unexpected type")
return UITableViewCell()
}
OWSTableItem.configureCell(cell)
let dataSource = filteredSections
let cnContact = dataSource[indexPath.section][indexPath.row]

@ -74,6 +74,9 @@ class ContactCell: UITableViewCell {
self.contact = contact
self.showsWhenSelected = showsWhenSelected
self.titleLabel.textColor = Theme.primaryColor
self.subtitleLabel.textColor = Theme.secondaryColor
let cnContact = contactsManager.cnContact(withId: contact.cnContactId)
titleLabel.attributedText = cnContact?.formattedFullName(font: titleLabel.font)
updateSubtitle(subtitleType: subtitleType, contact: contact)

@ -30,7 +30,7 @@ public class ContactFieldView: UIView {
return
}
let row = UIView()
row.backgroundColor = UIColor(rgbHex: 0xdedee1)
row.backgroundColor = Theme.secondaryColor
self.addSubview(row)
row.autoSetDimension(.height, toSize: 1)
row.autoPinLeadingToSuperviewMargin(withInset: hMargin)
@ -118,14 +118,14 @@ public class ContactFieldView: UIView {
let nameLabel = UILabel()
nameLabel.text = name.lowercased()
nameLabel.font = UIFont.ows_dynamicTypeSubheadline
nameLabel.textColor = UIColor.black
nameLabel.textColor = Theme.secondaryColor
nameLabel.lineBreakMode = .byTruncatingTail
stackView.addArrangedSubview(nameLabel)
let valueLabel = UILabel()
valueLabel.text = value
valueLabel.font = UIFont.ows_dynamicTypeBody
valueLabel.textColor = UIColor.ows_materialBlue
valueLabel.textColor = Theme.primaryColor
valueLabel.lineBreakMode = .byTruncatingTail
stackView.addArrangedSubview(valueLabel)
@ -148,7 +148,7 @@ public class ContactFieldView: UIView {
let nameLabel = UILabel()
nameLabel.text = address.localizedLabel()
nameLabel.font = UIFont.ows_dynamicTypeSubheadline
nameLabel.textColor = UIColor.black
nameLabel.textColor = Theme.secondaryColor
nameLabel.lineBreakMode = .byTruncatingTail
stackView.addArrangedSubview(nameLabel)
@ -169,7 +169,7 @@ public class ContactFieldView: UIView {
let nameLabel = UILabel()
nameLabel.text = propertyName
nameLabel.font = UIFont.ows_dynamicTypeBody
nameLabel.textColor = UIColor.black
nameLabel.textColor = Theme.secondaryColor
nameLabel.lineBreakMode = .byTruncatingTail
row.addArrangedSubview(nameLabel)
nameLabel.setContentHuggingHigh()
@ -178,7 +178,7 @@ public class ContactFieldView: UIView {
let valueLabel = UILabel()
valueLabel.text = propertyValue
valueLabel.font = UIFont.ows_dynamicTypeBody
valueLabel.textColor = UIColor.ows_materialBlue
valueLabel.textColor = Theme.primaryColor
valueLabel.lineBreakMode = .byTruncatingTail
row.addArrangedSubview(valueLabel)

@ -324,7 +324,7 @@ public class ContactShareApprovalViewController: OWSViewController, EditContactS
self.navigationItem.title = NSLocalizedString("CONTACT_SHARE_APPROVAL_VIEW_TITLE",
comment: "Title for the 'Approve contact share' view.")
self.view.backgroundColor = UIColor.white
self.view.backgroundColor = Theme.backgroundColor
updateContent()
@ -416,7 +416,7 @@ public class ContactShareApprovalViewController: OWSViewController, EditContactS
self.nameLabel = nameLabel
nameLabel.text = contactShare.name.displayName
nameLabel.font = UIFont.ows_dynamicTypeBody.ows_mediumWeight()
nameLabel.textColor = UIColor.black
nameLabel.textColor = Theme.primaryColor
nameLabel.lineBreakMode = .byTruncatingTail
stackView.addArrangedSubview(nameLabel)

Loading…
Cancel
Save