Merge branch 'nt/little-things'

This commit is contained in:
Nora Trapp 2019-06-14 09:30:34 -07:00
commit ddbdfd8fbd
4 changed files with 11 additions and 1 deletions

View File

@ -317,7 +317,7 @@ const CGFloat kMaxTextViewHeight = 98;
_suggestedStickerView = [[StickerHorizontalListView alloc] initWithCellSize:suggestedStickerSize
cellInset:0
spacing:suggestedStickerSpacing];
self.suggestedStickerView.backgroundColor = UIColor.clearColor;
self.suggestedStickerView.backgroundColor = Theme.conversationButtonBackgroundColor;
self.suggestedStickerView.contentInset = UIEdgeInsetsMake(
suggestedStickerSpacing, suggestedStickerSpacing, suggestedStickerSpacing, suggestedStickerSpacing);
self.suggestedStickerView.hidden = YES;

View File

@ -39,6 +39,8 @@ extern NSString *const ThemeDidChangeNotification;
@property (class, readonly, nonatomic) UIColor *cellSelectedColor;
@property (class, readonly, nonatomic) UIColor *cellSeparatorColor;
@property (class, readonly, nonatomic) UIColor *cursorColor;
// In some contexts, e.g. media viewing/sending, we always use "dark theme" UI regardless of the
// users chosen theme.
@property (class, readonly, nonatomic) UIColor *darkThemeNavbarIconColor;

View File

@ -168,6 +168,11 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
return Theme.hairlineColor;
}
+ (UIColor *)cursorColor
{
return Theme.isDarkThemeEnabled ? UIColor.ows_whiteColor : UIColor.ows_materialBlueColor;
}
+ (UIColor *)darkThemeBackgroundColor
{
return UIColor.ows_gray95Color;

View File

@ -54,6 +54,9 @@
// If we set NSShadowAttributeName, the NSForegroundColorAttributeName value is ignored.
UINavigationBar.appearance.titleTextAttributes = @{ NSForegroundColorAttributeName : Theme.navbarTitleColor };
UITextView.appearance.tintColor = Theme.cursorColor;
UITextField.appearance.tintColor = Theme.cursorColor;
}
@end