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
+7 -7
View File
@@ -394,7 +394,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
NSString *roomCount = [NSString stringWithFormat:@" %tu", count];
NSMutableAttributedString *mutableSectionTitle = [[NSMutableAttributedString alloc] initWithString:title
attributes:@{NSForegroundColorAttributeName : kRiotTextColorBlack,
attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:15.0]}];
[mutableSectionTitle appendAttributedString:[[NSMutableAttributedString alloc] initWithString:roomCount
attributes:@{NSForegroundColorAttributeName : kRiotColorSilver,
@@ -405,7 +405,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
else if (title)
{
sectionTitle = [[NSAttributedString alloc] initWithString:title
attributes:@{NSForegroundColorAttributeName : kRiotTextColorBlack,
attributes:@{NSForegroundColorAttributeName : kRiotPrimaryTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:15.0]}];
}
@@ -444,7 +444,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
if (count)
{
UILabel *missedNotifAndUnreadBadgeLabel = [[UILabel alloc] init];
missedNotifAndUnreadBadgeLabel.textColor = [UIColor whiteColor];
missedNotifAndUnreadBadgeLabel.textColor = kRiotPrimaryBgColor;
missedNotifAndUnreadBadgeLabel.font = [UIFont boldSystemFontOfSize:14];
if (count > 1000)
{
@@ -491,7 +491,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
- (UIView *)viewForHeaderInSection:(NSInteger)section withFrame:(CGRect)frame
{
UIView *sectionHeader = [[UIView alloc] initWithFrame:frame];
sectionHeader.backgroundColor = kRiotColorLightGrey;
sectionHeader.backgroundColor = kRiotSecondaryBgColor;
NSInteger sectionBitwise = 0;
UIImageView *chevronView;
UIView *accessoryView;
@@ -600,7 +600,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
// Add the "Network" label at the left
UILabel *networkLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, 100, 30)];
networkLabel.translatesAutoresizingMaskIntoConstraints = NO;
networkLabel.textColor = kRiotTextColorBlack;
networkLabel.textColor = kRiotPrimaryTextColor;
networkLabel.font = [UIFont systemFontOfSize:16.0];
networkLabel.text = NSLocalizedStringFromTable(@"room_recents_directory_section_network", @"Vector", nil);
[directorySectionContainer addSubview:networkLabel];
@@ -608,7 +608,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
// Add label for selected directory server
directoryServerLabel = [[UILabel alloc] initWithFrame:CGRectMake(120, 0, containerWidth - 32, 30)];
directoryServerLabel.translatesAutoresizingMaskIntoConstraints = NO;
directoryServerLabel.textColor = kRiotTextColorGray;
directoryServerLabel.textColor = kRiotSecondaryTextColor;
directoryServerLabel.font = [UIFont systemFontOfSize:16.0];
directoryServerLabel.textAlignment = NSTextAlignmentRight;
[directorySectionContainer addSubview:directoryServerLabel];
@@ -815,7 +815,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
if (!tableViewCell)
{
tableViewCell = [[MXKTableViewCell alloc] init];
tableViewCell.textLabel.textColor = kRiotTextColorGray;
tableViewCell.textLabel.textColor = kRiotSecondaryTextColor;
tableViewCell.textLabel.font = [UIFont systemFontOfSize:15.0];
tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone;
}