mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Dark Theme - Bug Fix
Wrong sub-title color in section header after a UI theme change.
This commit is contained in:
parent
633ad28117
commit
f7b3534960
2 changed files with 12 additions and 5 deletions
|
@ -46,6 +46,7 @@
|
|||
NSInteger shrinkedSectionsBitMask;
|
||||
|
||||
UIView *localContactsCheckboxContainer;
|
||||
UILabel *checkboxLabel;
|
||||
UIImageView *localContactsCheckbox;
|
||||
}
|
||||
|
||||
|
@ -117,6 +118,7 @@
|
|||
_contactCellAccessoryImage = nil;
|
||||
|
||||
localContactsCheckboxContainer = nil;
|
||||
checkboxLabel = nil;
|
||||
localContactsCheckbox = nil;
|
||||
|
||||
[hsUserDirectoryOperation cancel];
|
||||
|
@ -848,9 +850,8 @@
|
|||
localContactsCheckbox.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
[localContactsCheckboxContainer addSubview:localContactsCheckbox];
|
||||
|
||||
UILabel *checkboxLabel = [[UILabel alloc] initWithFrame:CGRectMake(54, 5, containerWidth - 64, 30)];
|
||||
checkboxLabel = [[UILabel alloc] initWithFrame:CGRectMake(54, 5, containerWidth - 64, 30)];
|
||||
checkboxLabel.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
checkboxLabel.textColor = kRiotPrimaryTextColor;
|
||||
checkboxLabel.font = [UIFont systemFontOfSize:16.0];
|
||||
checkboxLabel.text = NSLocalizedStringFromTable(@"contacts_address_book_matrix_users_toggle", @"Vector", nil);
|
||||
[localContactsCheckboxContainer addSubview:checkboxLabel];
|
||||
|
@ -969,6 +970,9 @@
|
|||
[NSLayoutConstraint activateConstraints:@[heightConstraint, centerYConstraint, leadingConstraint, trailingConstraint]];
|
||||
}
|
||||
|
||||
// Apply UI theme
|
||||
checkboxLabel.textColor = kRiotPrimaryTextColor;
|
||||
|
||||
// Set the right value of the tick box
|
||||
localContactsCheckbox.image = hideNonMatrixEnabledContacts ? [UIImage imageNamed:@"selection_tick"] : [UIImage imageNamed:@"selection_untick"];
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
|
|||
NSInteger shrinkedSectionsBitMask;
|
||||
|
||||
UIView *directorySectionContainer;
|
||||
UILabel *networkLabel;
|
||||
UILabel *directoryServerLabel;
|
||||
|
||||
NSMutableDictionary<NSString*, id> *roomTagsListenerByUserId;
|
||||
|
@ -598,9 +599,8 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
|
|||
directorySectionContainer.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
// Add the "Network" label at the left
|
||||
UILabel *networkLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, 100, 30)];
|
||||
networkLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, 100, 30)];
|
||||
networkLabel.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
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,6 @@ 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 = kRiotSecondaryTextColor;
|
||||
directoryServerLabel.font = [UIFont systemFontOfSize:16.0];
|
||||
directoryServerLabel.textAlignment = NSTextAlignmentRight;
|
||||
[directorySectionContainer addSubview:directoryServerLabel];
|
||||
|
@ -726,6 +725,10 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
|
|||
[NSLayoutConstraint activateConstraints:@[trailingConstraint, centerYConstraint, widthConstraint, heightConstraint]];
|
||||
}
|
||||
|
||||
// Apply the current UI theme.
|
||||
networkLabel.textColor = kRiotPrimaryTextColor;
|
||||
directoryServerLabel.textColor = kRiotSecondaryTextColor;
|
||||
|
||||
// Set the current directory server name
|
||||
directoryServerLabel.text = _publicRoomsDirectoryDataSource.directoryServerDisplayname;
|
||||
|
||||
|
|
Loading…
Reference in a new issue