Refine views.

pull/1/head
Matthew Chen 7 years ago
parent 8862f9a531
commit b2b95597cc

@ -383,7 +383,7 @@ const CGFloat kIconViewLength = 24;
UILabel *rowLabel = [UILabel new]; UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString( rowLabel.text = NSLocalizedString(
@"DISAPPEARING_MESSAGES", @"table cell label in conversation settings"); @"DISAPPEARING_MESSAGES", @"table cell label in conversation settings");
rowLabel.textColor = [UIColor blackColor]; rowLabel.textColor = [UIColor ows_themePrimaryColor];
rowLabel.font = [UIFont ows_dynamicTypeBodyFont]; rowLabel.font = [UIFont ows_dynamicTypeBodyFont];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
@ -403,7 +403,7 @@ const CGFloat kIconViewLength = 24;
UILabel *subtitleLabel = [UILabel new]; UILabel *subtitleLabel = [UILabel new];
subtitleLabel.text = NSLocalizedString( subtitleLabel.text = NSLocalizedString(
@"DISAPPEARING_MESSAGES_DESCRIPTION", @"subheading in conversation settings"); @"DISAPPEARING_MESSAGES_DESCRIPTION", @"subheading in conversation settings");
subtitleLabel.textColor = [UIColor blackColor]; subtitleLabel.textColor = [UIColor ows_themePrimaryColor];
subtitleLabel.font = [UIFont ows_dynamicTypeCaption1Font]; subtitleLabel.font = [UIFont ows_dynamicTypeCaption1Font];
subtitleLabel.numberOfLines = 0; subtitleLabel.numberOfLines = 0;
subtitleLabel.lineBreakMode = NSLineBreakByWordWrapping; subtitleLabel.lineBreakMode = NSLineBreakByWordWrapping;
@ -433,7 +433,7 @@ const CGFloat kIconViewLength = 24;
UILabel *rowLabel = strongSelf.disappearingMessagesDurationLabel; UILabel *rowLabel = strongSelf.disappearingMessagesDurationLabel;
[strongSelf updateDisappearingMessagesDurationLabel]; [strongSelf updateDisappearingMessagesDurationLabel];
rowLabel.textColor = [UIColor blackColor]; rowLabel.textColor = [UIColor ows_themePrimaryColor];
rowLabel.font = [UIFont ows_dynamicTypeBodyFont]; rowLabel.font = [UIFont ows_dynamicTypeBodyFont];
// don't truncate useful duration info which is in the tail // don't truncate useful duration info which is in the tail
rowLabel.lineBreakMode = NSLineBreakByTruncatingHead; rowLabel.lineBreakMode = NSLineBreakByTruncatingHead;
@ -526,7 +526,7 @@ const CGFloat kIconViewLength = 24;
UILabel *rowLabel = [UILabel new]; UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString(@"SETTINGS_ITEM_NOTIFICATION_SOUND", rowLabel.text = NSLocalizedString(@"SETTINGS_ITEM_NOTIFICATION_SOUND",
@"Label for settings view that allows user to change the notification sound."); @"Label for settings view that allows user to change the notification sound.");
rowLabel.textColor = [UIColor blackColor]; rowLabel.textColor = [UIColor ows_themePrimaryColor];
rowLabel.font = [UIFont ows_dynamicTypeBodyFont]; rowLabel.font = [UIFont ows_dynamicTypeBodyFont];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
@ -565,7 +565,7 @@ const CGFloat kIconViewLength = 24;
UILabel *rowLabel = [UILabel new]; UILabel *rowLabel = [UILabel new];
rowLabel.text = NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_LABEL", rowLabel.text = NSLocalizedString(@"CONVERSATION_SETTINGS_MUTE_LABEL",
@"label for 'mute thread' cell in conversation settings"); @"label for 'mute thread' cell in conversation settings");
rowLabel.textColor = [UIColor blackColor]; rowLabel.textColor = [UIColor ows_themePrimaryColor];
rowLabel.font = [UIFont ows_dynamicTypeBodyFont]; rowLabel.font = [UIFont ows_dynamicTypeBodyFont];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
@ -688,7 +688,7 @@ const CGFloat kIconViewLength = 24;
UILabel *rowLabel = [UILabel new]; UILabel *rowLabel = [UILabel new];
rowLabel.text = name; rowLabel.text = name;
rowLabel.textColor = [UIColor blackColor]; rowLabel.textColor = [UIColor ows_themePrimaryColor];
rowLabel.font = [UIFont ows_dynamicTypeBodyFont]; rowLabel.font = [UIFont ows_dynamicTypeBodyFont];
rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; rowLabel.lineBreakMode = NSLineBreakByTruncatingTail;
@ -744,7 +744,7 @@ const CGFloat kIconViewLength = 24;
UILabel *threadTitleLabel = [UILabel new]; UILabel *threadTitleLabel = [UILabel new];
threadTitleLabel.text = self.threadName; threadTitleLabel.text = self.threadName;
threadTitleLabel.textColor = [UIColor blackColor]; threadTitleLabel.textColor = [UIColor ows_themePrimaryColor];
threadTitleLabel.font = [UIFont ows_dynamicTypeTitle2Font]; threadTitleLabel.font = [UIFont ows_dynamicTypeTitle2Font];
threadTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail; threadTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[threadNameView addSubview:threadTitleLabel]; [threadNameView addSubview:threadTitleLabel];
@ -757,7 +757,7 @@ const CGFloat kIconViewLength = 24;
const CGFloat kSubtitlePointSize = 12.f; const CGFloat kSubtitlePointSize = 12.f;
void (^addSubtitle)(NSAttributedString *) = ^(NSAttributedString *subtitle) { void (^addSubtitle)(NSAttributedString *) = ^(NSAttributedString *subtitle) {
UILabel *subtitleLabel = [UILabel new]; UILabel *subtitleLabel = [UILabel new];
subtitleLabel.textColor = [UIColor ows_darkGrayColor]; subtitleLabel.textColor = [UIColor ows_themeSecondaryColor];
subtitleLabel.font = [UIFont ows_regularFontWithSize:kSubtitlePointSize]; subtitleLabel.font = [UIFont ows_regularFontWithSize:kSubtitlePointSize];
subtitleLabel.attributedText = subtitle; subtitleLabel.attributedText = subtitle;
subtitleLabel.lineBreakMode = NSLineBreakByTruncatingTail; subtitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
@ -835,7 +835,7 @@ const CGFloat kIconViewLength = 24;
OWSAssert(icon); OWSAssert(icon);
UIImageView *iconView = [UIImageView new]; UIImageView *iconView = [UIImageView new];
iconView.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; iconView.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
iconView.tintColor = [UIColor ows_darkIconColor]; iconView.tintColor = [UIColor ows_themeSecondaryColor];
iconView.contentMode = UIViewContentModeScaleAspectFit; iconView.contentMode = UIViewContentModeScaleAspectFit;
iconView.layer.minificationFilter = kCAFilterTrilinear; iconView.layer.minificationFilter = kCAFilterTrilinear;
iconView.layer.magnificationFilter = kCAFilterTrilinear; iconView.layer.magnificationFilter = kCAFilterTrilinear;

@ -172,7 +172,7 @@ NS_ASSUME_NONNULL_BEGIN
firstSectionHeader.userInteractionEnabled = YES; firstSectionHeader.userInteractionEnabled = YES;
[firstSectionHeader [firstSectionHeader
addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(headerWasTapped:)]]; addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(headerWasTapped:)]];
firstSectionHeader.backgroundColor = [UIColor whiteColor]; firstSectionHeader.backgroundColor = [UIColor ows_themeBackgroundColor];
UIView *threadInfoView = [UIView new]; UIView *threadInfoView = [UIView new];
[firstSectionHeader addSubview:threadInfoView]; [firstSectionHeader addSubview:threadInfoView];
[threadInfoView autoPinWidthToSuperviewWithMargin:16.f]; [threadInfoView autoPinWidthToSuperviewWithMargin:16.f];
@ -193,7 +193,7 @@ NS_ASSUME_NONNULL_BEGIN
UITextField *groupNameTextField = [UITextField new]; UITextField *groupNameTextField = [UITextField new];
_groupNameTextField = groupNameTextField; _groupNameTextField = groupNameTextField;
self.groupNameTextField.text = [self.thread.groupModel.groupName ows_stripped]; self.groupNameTextField.text = [self.thread.groupModel.groupName ows_stripped];
groupNameTextField.textColor = [UIColor blackColor]; groupNameTextField.textColor = [UIColor ows_themePrimaryColor];
groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font]; groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font];
groupNameTextField.placeholder groupNameTextField.placeholder
= NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @"Placeholder text for group name field"); = NSLocalizedString(@"NEW_GROUP_NAMEGROUP_REQUEST_DEFAULT", @"Placeholder text for group name field");

Loading…
Cancel
Save