Enable Dark theme

TODO:
- fix the app freeze when user changes the app theme.
This commit is contained in:
Giom Foret
2017-08-11 16:56:09 +02:00
parent 1c9fc7a910
commit c4aa8013be
109 changed files with 1528 additions and 339 deletions
@@ -111,8 +111,11 @@
{
[super customizeViewRendering];
self.separatorView.backgroundColor = kRiotColorLightGrey;
self.messageLabel.textColor = kRiotTextColorGray;
self.separatorView.backgroundColor = kRiotSecondaryBgColor;
if (self.messageLabel.textColor != kRiotColorPinkRed)
{
self.messageLabel.textColor = kRiotSecondaryTextColor;
}
}
#pragma mark -
@@ -234,12 +237,12 @@
// Display the string in white on pink red
NSRange wholeString = NSMakeRange(0, onGoingConferenceCallAttibutedString.length);
[onGoingConferenceCallAttibutedString addAttribute:NSForegroundColorAttributeName value:UIColor.whiteColor range:wholeString];
[onGoingConferenceCallAttibutedString addAttribute:NSForegroundColorAttributeName value:kRiotPrimaryBgColor range:wholeString];
[onGoingConferenceCallAttibutedString addAttribute:NSBackgroundColorAttributeName value:kRiotColorPinkRed range:wholeString];
[onGoingConferenceCallAttibutedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:wholeString];
self.messageTextView.attributedText = onGoingConferenceCallAttibutedString;
self.messageTextView.tintColor = UIColor.whiteColor;
self.messageTextView.tintColor = kRiotPrimaryBgColor;
self.messageTextView.hidden = NO;
self.backgroundColor = kRiotColorPinkRed;
@@ -330,7 +333,7 @@
[self.messageTextView resignFirstResponder];
self.messageTextView.hidden = YES;
self.messageLabel.textColor = kRiotTextColorGray;
self.messageLabel.textColor = kRiotSecondaryTextColor;
objc_removeAssociatedObjects(self.messageTextView);
}