separate icon vs. title color for toolbars

pull/1/head
Michael Kirk 7 years ago
parent 33ab3a663c
commit 5719aba91a

@ -64,13 +64,13 @@ public class ConversationHeaderView: UIStackView {
avatarView.layer.borderWidth = 0
titleLabel = UILabel()
titleLabel.textColor = .ows_navbarForeground
titleLabel.textColor = .ows_navbarTitle
titleLabel.lineBreakMode = .byTruncatingTail
titleLabel.font = titlePrimaryFont
titleLabel.setContentHuggingHigh()
subtitleLabel = UILabel()
subtitleLabel.textColor = .ows_navbarForeground
subtitleLabel.textColor = .ows_navbarTitle
subtitleLabel.lineBreakMode = .byTruncatingTail
subtitleLabel.font = subtitleFont
subtitleLabel.setContentHuggingHigh()

@ -1321,11 +1321,11 @@ typedef enum : NSUInteger {
if (OWSWindowManager.sharedManager.hasCall) {
callButton.enabled = NO;
callButton.userInteractionEnabled = NO;
callButton.tintColor = [UIColor.ows_navbarForegroundColor colorWithAlphaComponent:0.7];
callButton.tintColor = [UIColor.ows_navbarIconColor colorWithAlphaComponent:0.7];
} else {
callButton.enabled = YES;
callButton.userInteractionEnabled = YES;
callButton.tintColor = UIColor.ows_navbarForegroundColor;
callButton.tintColor = UIColor.ows_navbarIconColor;
}
UIEdgeInsets imageEdgeInsets = UIEdgeInsetsZero;
@ -1353,7 +1353,7 @@ typedef enum : NSUInteger {
DisappearingTimerConfigurationView *timerView = [[DisappearingTimerConfigurationView alloc]
initWithDurationSeconds:self.disappearingMessagesConfiguration.durationSeconds];
timerView.delegate = self;
timerView.tintColor = UIColor.ows_navbarForegroundColor;
timerView.tintColor = UIColor.ows_navbarIconColor;
// As of iOS11, we can size barButton item custom views with autoLayout.
// Before that, though we can still use autoLayout *within* the customView,
@ -1375,7 +1375,7 @@ typedef enum : NSUInteger {
{
NSMutableAttributedString *subtitleText = [NSMutableAttributedString new];
UIColor *subtitleColor = [UIColor.ows_navbarForegroundColor colorWithAlphaComponent:(CGFloat)0.9];
UIColor *subtitleColor = [UIColor.ows_navbarTitleColor colorWithAlphaComponent:(CGFloat)0.9];
if (self.thread.isMuted) {
// Show a "mute" icon before the navigation bar subtitle if this thread is muted.
[subtitleText

@ -415,7 +415,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
// The contents of the navigation bar are cramped in this view.
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
UIImage *image = [[UIImage imageNamed:@"button_settings_white"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
button.tintColor = UIColor.ows_navbarForegroundColor;
button.tintColor = UIColor.ows_navbarIconColor;
[button setImage:image forState:UIControlStateNormal];
UIEdgeInsets imageEdgeInsets = UIEdgeInsetsZero;
// We normally would want to use left and right insets that ensure the button

@ -587,7 +587,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou
lazy private var headerNameLabel: UILabel = {
let label = UILabel()
label.textColor = .ows_navbarForeground
label.textColor = .ows_navbarTitle
label.font = UIFont.ows_regularFont(withSize: 17)
label.textAlignment = .center
label.adjustsFontSizeToFitWidth = true
@ -598,7 +598,7 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou
lazy private var headerDateLabel: UILabel = {
let label = UILabel()
label.textColor = .ows_navbarForeground
label.textColor = .ows_navbarTitle
label.font = UIFont.ows_regularFont(withSize: 12)
label.textAlignment = .center
label.adjustsFontSizeToFitWidth = true

@ -11,7 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Global App Colors
@property (class, readonly, nonatomic) UIColor *ows_navbarBackgroundColor;
@property (class, readonly, nonatomic) UIColor *ows_navbarForegroundColor;
@property (class, readonly, nonatomic) UIColor *ows_navbarIconColor;
@property (class, readonly, nonatomic) UIColor *ows_navbarTitleColor;
#pragma mark -

@ -17,11 +17,14 @@ NS_ASSUME_NONNULL_BEGIN
return UIColor.ows_whiteColor;
}
+ (UIColor *)ows_navbarForegroundColor
+ (UIColor *)ows_navbarIconColor
{
// return UIColor.ows_blackColor;
return UIColor.greenColor;
return UIColor.ows_light60Color;
}
+ (UIColor *)ows_navbarTitleColor
{
return UIColor.ows_light90Color;
}
#pragma mark -

@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
UIImage *backImage = [[UIImage imageNamed:(isRTL ? @"NavBarBackRTL" : @"NavBarBack")] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
OWSAssert(backImage);
[backButton setImage:backImage forState:UIControlStateNormal];
backButton.tintColor = UIColor.ows_navbarForegroundColor;
backButton.tintColor = UIColor.ows_navbarIconColor;
backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;

@ -27,11 +27,11 @@
+ (void)setupSignalAppearence
{
UINavigationBar.appearance.barTintColor = UIColor.ows_navbarBackgroundColor;
UINavigationBar.appearance.tintColor = UIColor.ows_navbarForegroundColor;
UINavigationBar.appearance.tintColor = UIColor.ows_navbarIconColor;
UIToolbar.appearance.barTintColor = UIColor.ows_navbarBackgroundColor;
UIToolbar.appearance.tintColor = UIColor.ows_navbarForegroundColor;
UIToolbar.appearance.tintColor = UIColor.ows_navbarIconColor;
UIBarButtonItem.appearance.tintColor = UIColor.ows_navbarForegroundColor;
UIBarButtonItem.appearance.tintColor = UIColor.ows_navbarIconColor;
// Because our launch screen is blue, we specify the light content in our plist
// but once the app has loaded we want to switch to dark.
[CurrentAppContext() setStatusBarStyle:UIStatusBarStyleDefault];
@ -43,9 +43,7 @@
[[UIToolbar appearance] setTintColor:[UIColor ows_materialBlueColor]];
// If we set NSShadowAttributeName, the NSForegroundColorAttributeName value is ignored.
UINavigationBar.appearance.titleTextAttributes = @{
NSForegroundColorAttributeName : UIColor.ows_navbarForegroundColor
};
UINavigationBar.appearance.titleTextAttributes = @{ NSForegroundColorAttributeName : UIColor.ows_navbarTitleColor };
}
@end

Loading…
Cancel
Save