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
+6 -6
View File
@@ -42,10 +42,10 @@
{
[super customizeTableViewCellRendering];
self.roomTitle.textColor = kRiotTextColorBlack;
self.lastEventDescription.textColor = kRiotTextColorGray;
self.lastEventDate.textColor = kRiotTextColorGray;
self.missedNotifAndUnreadBadgeLabel.textColor = [UIColor whiteColor];
self.roomTitle.textColor = kRiotPrimaryTextColor;
self.lastEventDescription.textColor = kRiotSecondaryTextColor;
self.lastEventDate.textColor = kRiotSecondaryTextColor;
self.missedNotifAndUnreadBadgeLabel.textColor = kRiotPrimaryBgColor;
// Prepare direct room border
[self.directRoomBorderView.layer setCornerRadius:self.directRoomBorderView.frame.size.width / 2];
@@ -82,7 +82,7 @@
{
// Force the default text color for the last message (cancel highlighted message color)
NSMutableAttributedString *lastEventDescription = [[NSMutableAttributedString alloc] initWithAttributedString:roomCellData.lastEventAttributedTextMessage];
[lastEventDescription addAttribute:NSForegroundColorAttributeName value:kRiotTextColorGray range:NSMakeRange(0, lastEventDescription.length)];
[lastEventDescription addAttribute:NSForegroundColorAttributeName value:kRiotSecondaryTextColor range:NSMakeRange(0, lastEventDescription.length)];
self.lastEventDescription.attributedText = lastEventDescription;
}
else
@@ -124,7 +124,7 @@
}
else
{
self.lastEventDate.textColor = kRiotTextColorGray;
self.lastEventDate.textColor = kRiotSecondaryTextColor;
// The room title is not bold anymore
if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)])