diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index 7409e6559..9a7ba135f 100755 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -549,6 +549,12 @@ F0D869EB1EC455A100BB0A2B /* create_direct_chat.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E81EC455A100BB0A2B /* create_direct_chat.png */; }; F0D869EC1EC455A100BB0A2B /* create_direct_chat@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E91EC455A100BB0A2B /* create_direct_chat@2x.png */; }; F0D869ED1EC455A100BB0A2B /* create_direct_chat@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869EA1EC455A100BB0A2B /* create_direct_chat@3x.png */; }; + F0D9F23E1FED1A05001D9A27 /* add_group_participant.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D9F23B1FED1A04001D9A27 /* add_group_participant.png */; }; + F0D9F23F1FED1A05001D9A27 /* add_group_participant@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D9F23C1FED1A04001D9A27 /* add_group_participant@3x.png */; }; + F0D9F2401FED1A05001D9A27 /* add_group_participant@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D9F23D1FED1A05001D9A27 /* add_group_participant@2x.png */; }; + F0D9F2441FED1E57001D9A27 /* remove_icon_blue@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D9F2411FED1E57001D9A27 /* remove_icon_blue@3x.png */; }; + F0D9F2451FED1E57001D9A27 /* remove_icon_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D9F2421FED1E57001D9A27 /* remove_icon_blue.png */; }; + F0D9F2461FED1E57001D9A27 /* remove_icon_blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D9F2431FED1E57001D9A27 /* remove_icon_blue@2x.png */; }; F0DD05D01F615ECF00CB5292 /* LaunchScreenRiot.png in Resources */ = {isa = PBXBuildFile; fileRef = F0DD05CF1F615ECF00CB5292 /* LaunchScreenRiot.png */; }; F0E059FD1E9545BB004B83FB /* UnifiedSearchRecentsDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = F0E059FC1E9545BB004B83FB /* UnifiedSearchRecentsDataSource.m */; }; F0E05A021E963103004B83FB /* FavouritesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0E059FF1E963103004B83FB /* FavouritesViewController.m */; }; @@ -1330,6 +1336,12 @@ F0D869E81EC455A100BB0A2B /* create_direct_chat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = create_direct_chat.png; sourceTree = ""; }; F0D869E91EC455A100BB0A2B /* create_direct_chat@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "create_direct_chat@2x.png"; sourceTree = ""; }; F0D869EA1EC455A100BB0A2B /* create_direct_chat@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "create_direct_chat@3x.png"; sourceTree = ""; }; + F0D9F23B1FED1A04001D9A27 /* add_group_participant.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = add_group_participant.png; sourceTree = ""; }; + F0D9F23C1FED1A04001D9A27 /* add_group_participant@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "add_group_participant@3x.png"; sourceTree = ""; }; + F0D9F23D1FED1A05001D9A27 /* add_group_participant@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "add_group_participant@2x.png"; sourceTree = ""; }; + F0D9F2411FED1E57001D9A27 /* remove_icon_blue@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "remove_icon_blue@3x.png"; sourceTree = ""; }; + F0D9F2421FED1E57001D9A27 /* remove_icon_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = remove_icon_blue.png; sourceTree = ""; }; + F0D9F2431FED1E57001D9A27 /* remove_icon_blue@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "remove_icon_blue@2x.png"; sourceTree = ""; }; F0DD05CF1F615ECF00CB5292 /* LaunchScreenRiot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = LaunchScreenRiot.png; path = Assets/Images/LaunchScreenRiot.png; sourceTree = ""; }; F0E059FB1E9545BB004B83FB /* UnifiedSearchRecentsDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnifiedSearchRecentsDataSource.h; sourceTree = ""; }; F0E059FC1E9545BB004B83FB /* UnifiedSearchRecentsDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UnifiedSearchRecentsDataSource.m; sourceTree = ""; }; @@ -1723,6 +1735,12 @@ F083BB151E7009EC00A9B29C /* Images */ = { isa = PBXGroup; children = ( + F0D9F2421FED1E57001D9A27 /* remove_icon_blue.png */, + F0D9F2431FED1E57001D9A27 /* remove_icon_blue@2x.png */, + F0D9F2411FED1E57001D9A27 /* remove_icon_blue@3x.png */, + F0D9F23B1FED1A04001D9A27 /* add_group_participant.png */, + F0D9F23D1FED1A05001D9A27 /* add_group_participant@2x.png */, + F0D9F23C1FED1A04001D9A27 /* add_group_participant@3x.png */, F046DC761FE19F8D00E3DAF0 /* create_group.png */, F046DC771FE19F8D00E3DAF0 /* create_group@2x.png */, F046DC751FE19F8D00E3DAF0 /* create_group@3x.png */, @@ -2810,6 +2828,7 @@ F083BD9D1E7009ED00A9B29C /* main_alias_icon@3x.png in Resources */, F083BDA21E7009ED00A9B29C /* newmessages@2x.png in Resources */, F046DC781FE19F8E00E3DAF0 /* create_group@3x.png in Resources */, + F0D9F2401FED1A05001D9A27 /* add_group_participant@2x.png in Resources */, F083BEA11E7009ED00A9B29C /* TableViewCellWithLabelAndLargeTextView.xib in Resources */, F083BD881E7009ED00A9B29C /* file_doc_icon@3x.png in Resources */, F083BDAB1E7009ED00A9B29C /* placeholder@2x.png in Resources */, @@ -2967,6 +2986,7 @@ F083BDB01E7009ED00A9B29C /* priorityHigh.png in Resources */, F083BD271E7009ED00A9B29C /* admin_icon@3x.png in Resources */, F083BDDC1E7009ED00A9B29C /* typing@3x.png in Resources */, + F0D9F23F1FED1A05001D9A27 /* add_group_participant@3x.png in Resources */, F083BDC31E7009ED00A9B29C /* scrollup@2x.png in Resources */, F09A66571FD5A7A6004B13B5 /* tab_groups@2x.png in Resources */, F083BD451E7009ED00A9B29C /* call_video_mute_off_icon.png in Resources */, @@ -3004,6 +3024,7 @@ F083BD4D1E7009ED00A9B29C /* camera_capture@3x.png in Resources */, F083BDB11E7009ED00A9B29C /* priorityHigh@2x.png in Resources */, F0614A0E1EDDCCE700F5DC9A /* jump_to_unread@2x.png in Resources */, + F0D9F2451FED1E57001D9A27 /* remove_icon_blue.png in Resources */, F083BDC21E7009ED00A9B29C /* scrollup.png in Resources */, 329DCE1A1F988F8100468420 /* riot_icon_callkit@2.png in Resources */, F083BD521E7009ED00A9B29C /* camera_stop@2x.png in Resources */, @@ -3036,6 +3057,7 @@ F083BD7D1E7009ED00A9B29C /* error.png in Resources */, F083BD2E1E7009ED00A9B29C /* back_icon@2x.png in Resources */, F083BD501E7009ED00A9B29C /* camera_record.png in Resources */, + F0D9F2441FED1E57001D9A27 /* remove_icon_blue@3x.png in Resources */, F0D869EB1EC455A100BB0A2B /* create_direct_chat.png in Resources */, F083BDBB1E7009ED00A9B29C /* remove_icon_pink@3x.png in Resources */, F0E05A301EA0F9EB004B83FB /* tab_favourites_selected.png in Resources */, @@ -3107,6 +3129,7 @@ F083BE301E7009ED00A9B29C /* ContactTableViewCell.xib in Resources */, F083BE571E7009ED00A9B29C /* RoomOutgoingEncryptedTextMsgWithPaginationTitleBubbleCell.xib in Resources */, F083BE771E7009ED00A9B29C /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib in Resources */, + F0D9F2461FED1E57001D9A27 /* remove_icon_blue@2x.png in Resources */, F083BDA71E7009ED00A9B29C /* notificationsOff.png in Resources */, F06CDD6A1EF01E3900870B75 /* RoomEmptyBubbleCell.xib in Resources */, F0B5430A1F70FF8F00D29293 /* back_icon@4x.png in Resources */, @@ -3169,6 +3192,7 @@ F083BD461E7009ED00A9B29C /* call_video_mute_off_icon@2x.png in Resources */, F083BD311E7009ED00A9B29C /* bubbles_bg_landscape@2x.png in Resources */, F0E05A371EA0F9EB004B83FB /* tab_home_selected@2x.png in Resources */, + F0D9F23E1FED1A05001D9A27 /* add_group_participant.png in Resources */, F083BE651E7009ED00A9B29C /* RoomIncomingTextMsgWithoutSenderNameBubbleCell.xib in Resources */, F083BD6F1E7009ED00A9B29C /* e2e_blocked@2x.png in Resources */, ); diff --git a/Riot/Assets/Images/add_group_participant.png b/Riot/Assets/Images/add_group_participant.png new file mode 100755 index 000000000..6b6424eb9 Binary files /dev/null and b/Riot/Assets/Images/add_group_participant.png differ diff --git a/Riot/Assets/Images/add_group_participant@2x.png b/Riot/Assets/Images/add_group_participant@2x.png new file mode 100755 index 000000000..ec358c389 Binary files /dev/null and b/Riot/Assets/Images/add_group_participant@2x.png differ diff --git a/Riot/Assets/Images/add_group_participant@3x.png b/Riot/Assets/Images/add_group_participant@3x.png new file mode 100755 index 000000000..3bd549600 Binary files /dev/null and b/Riot/Assets/Images/add_group_participant@3x.png differ diff --git a/Riot/Assets/Images/remove_icon.png b/Riot/Assets/Images/remove_icon.png old mode 100644 new mode 100755 index 66e45060b..370c82e62 Binary files a/Riot/Assets/Images/remove_icon.png and b/Riot/Assets/Images/remove_icon.png differ diff --git a/Riot/Assets/Images/remove_icon@2x.png b/Riot/Assets/Images/remove_icon@2x.png old mode 100644 new mode 100755 index 9461aaebf..5523ca2c4 Binary files a/Riot/Assets/Images/remove_icon@2x.png and b/Riot/Assets/Images/remove_icon@2x.png differ diff --git a/Riot/Assets/Images/remove_icon@3x.png b/Riot/Assets/Images/remove_icon@3x.png old mode 100644 new mode 100755 index 90d97382f..ba7980920 Binary files a/Riot/Assets/Images/remove_icon@3x.png and b/Riot/Assets/Images/remove_icon@3x.png differ diff --git a/Riot/Assets/Images/remove_icon_blue.png b/Riot/Assets/Images/remove_icon_blue.png new file mode 100755 index 000000000..8d8376b96 Binary files /dev/null and b/Riot/Assets/Images/remove_icon_blue.png differ diff --git a/Riot/Assets/Images/remove_icon_blue@2x.png b/Riot/Assets/Images/remove_icon_blue@2x.png new file mode 100755 index 000000000..385e51416 Binary files /dev/null and b/Riot/Assets/Images/remove_icon_blue@2x.png differ diff --git a/Riot/Assets/Images/remove_icon_blue@3x.png b/Riot/Assets/Images/remove_icon_blue@3x.png new file mode 100755 index 000000000..f20566ed6 Binary files /dev/null and b/Riot/Assets/Images/remove_icon_blue@3x.png differ diff --git a/Riot/Assets/Images/remove_icon_pink.png b/Riot/Assets/Images/remove_icon_pink.png old mode 100644 new mode 100755 index c309b3e1c..68059933f Binary files a/Riot/Assets/Images/remove_icon_pink.png and b/Riot/Assets/Images/remove_icon_pink.png differ diff --git a/Riot/Assets/Images/remove_icon_pink@2x.png b/Riot/Assets/Images/remove_icon_pink@2x.png old mode 100644 new mode 100755 index 98c4a655c..4824feb84 Binary files a/Riot/Assets/Images/remove_icon_pink@2x.png and b/Riot/Assets/Images/remove_icon_pink@2x.png differ diff --git a/Riot/Assets/Images/remove_icon_pink@3x.png b/Riot/Assets/Images/remove_icon_pink@3x.png old mode 100644 new mode 100755 index 036d1803f..71cd00734 Binary files a/Riot/Assets/Images/remove_icon_pink@3x.png and b/Riot/Assets/Images/remove_icon_pink@3x.png differ diff --git a/Riot/ViewController/GroupDetailsViewController.m b/Riot/ViewController/GroupDetailsViewController.m index 0317b6307..70972d3a1 100644 --- a/Riot/ViewController/GroupDetailsViewController.m +++ b/Riot/ViewController/GroupDetailsViewController.m @@ -68,6 +68,8 @@ self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; + self.sectionHeaderTintColor = kRiotColorBlue; + // Keep visible the status bar by default. isStatusBarHidden = NO; } @@ -131,6 +133,32 @@ - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; + + // Consider the main navigation controller if the current view controller is embedded inside a split view controller. + UINavigationController *mainNavigationController = self.navigationController; + if (self.splitViewController.isCollapsed && self.splitViewController.viewControllers.count) + { + mainNavigationController = self.splitViewController.viewControllers.firstObject; + } + + if (mainNavigationController.navigationBar.tintColor == kRiotColorBlue) + { + // Restore default tintColor + mainNavigationController.navigationBar.tintColor = kRiotColorGreen; + } +} + +- (void)viewDidLayoutSubviews +{ + [super viewDidLayoutSubviews]; + + // Consider the main navigation controller if the current view controller is embedded inside a split view controller. + UINavigationController *mainNavigationController = self.navigationController; + if (self.splitViewController.isCollapsed && self.splitViewController.viewControllers.count) + { + mainNavigationController = self.splitViewController.viewControllers.firstObject; + } + mainNavigationController.navigationBar.tintColor = kRiotColorBlue; } - (void)destroy diff --git a/Riot/ViewController/GroupParticipantsViewController.m b/Riot/ViewController/GroupParticipantsViewController.m index e098eb61a..70ac4ab1c 100644 --- a/Riot/ViewController/GroupParticipantsViewController.m +++ b/Riot/ViewController/GroupParticipantsViewController.m @@ -119,8 +119,6 @@ // Search bar header is hidden when no group is provided _searchBarHeader.hidden = (self.group == nil); - [self setNavBarButtons]; - // Hide line separators of empty cells self.tableView.tableFooterView = [[UIView alloc] init]; @@ -174,8 +172,6 @@ - (void)didMoveToParentViewController:(nullable UIViewController *)parent { [super didMoveToParentViewController:parent]; - - [self setNavBarButtons]; } - (void)destroy @@ -417,14 +413,6 @@ [self.tableView reloadData]; } -- (void)setNavBarButtons -{ - // Check whether the view controller is currently displayed inside a segmented view controller or not. - UIViewController* topViewController = ((self.parentViewController) ? self.parentViewController : self); - topViewController.navigationItem.rightBarButtonItem = nil; - topViewController.navigationItem.leftBarButtonItem = nil; -} - - (void)addAddParticipantButton { // Add blur mask programmatically @@ -460,7 +448,7 @@ addParticipantButtonImageView.backgroundColor = [UIColor clearColor]; addParticipantButtonImageView.contentMode = UIViewContentModeCenter; - addParticipantButtonImageView.image = [UIImage imageNamed:@"add_participant"]; + addParticipantButtonImageView.image = [UIImage imageNamed:@"add_group_participant"]; CGFloat side = 78.0f; NSLayoutConstraint* widthConstraint = [NSLayoutConstraint constraintWithItem:addParticipantButtonImageView @@ -907,7 +895,7 @@ }]; - leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(25, 24)]; + leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon_blue" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(24, 24)]; [actions insertObject:leaveAction atIndex:0]; } @@ -1120,8 +1108,8 @@ - (void)refreshSearchBarItemsColor:(UISearchBar *)searchBar { // bar tint color - searchBar.barTintColor = searchBar.tintColor = kRiotColorGreen; - searchBar.tintColor = kRiotColorGreen; + searchBar.barTintColor = searchBar.tintColor = kRiotColorBlue; + searchBar.tintColor = kRiotColorBlue; // FIXME: this all seems incredibly fragile and tied to gutwrenching the current UISearchBar internals. @@ -1132,7 +1120,7 @@ // Magnifying glass icon. UIImageView *leftImageView = (UIImageView *)searchBarTextField.leftView; leftImageView.image = [leftImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; - leftImageView.tintColor = kRiotColorGreen; + leftImageView.tintColor = kRiotColorBlue; // remove the gray background color UIView *effectBackgroundTop = [searchBarTextField valueForKey:@"_effectBackgroundTop"]; @@ -1143,8 +1131,8 @@ // place holder searchBarTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:searchBarTextField.placeholder attributes:@{NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle), - NSUnderlineColorAttributeName: kRiotColorGreen, - NSForegroundColorAttributeName: kRiotColorGreen}]; + NSUnderlineColorAttributeName: kRiotColorBlue, + NSForegroundColorAttributeName: kRiotColorBlue}]; } - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText diff --git a/Riot/ViewController/GroupsViewController.m b/Riot/ViewController/GroupsViewController.m index beb614356..66bb67142 100644 --- a/Riot/ViewController/GroupsViewController.m +++ b/Riot/ViewController/GroupsViewController.m @@ -495,7 +495,7 @@ }]; - leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(25, 24)]; + leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon_blue" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(24, 24)]; [actions insertObject:leaveAction atIndex:0]; } diff --git a/Riot/ViewController/MasterTabBarController.m b/Riot/ViewController/MasterTabBarController.m index 74428ba03..dead1847e 100644 --- a/Riot/ViewController/MasterTabBarController.m +++ b/Riot/ViewController/MasterTabBarController.m @@ -436,39 +436,12 @@ _selectedEventId = nil; _selectedRoomSession = nil; - if (_currentRoomViewController) - { - // If the displayed data is not a preview, let the manager release the room data source - // (except if the view controller has the room data source ownership). - if (!_currentRoomViewController.roomPreviewData && _currentRoomViewController.roomDataSource && !_currentRoomViewController.hasRoomDataSourceOwnership) - { - MXSession *mxSession = _currentRoomViewController.roomDataSource.mxSession; - MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:mxSession]; - - // Let the manager release live room data sources where the user is in - [roomDataSourceManager closeRoomDataSource:_currentRoomViewController.roomDataSource forceClose:NO]; - } - - [_currentRoomViewController destroy]; - _currentRoomViewController = nil; - } - _selectedContact = nil; - if (_currentContactDetailViewController) - { - [_currentContactDetailViewController destroy]; - _currentContactDetailViewController = nil; - } - _selectedGroup = nil; _selectedGroupSession = nil; - if (_currentGroupDetailViewController) - { - [_currentGroupDetailViewController destroy]; - _currentGroupDetailViewController = nil; - } + [self releaseCurrentDetailsViewController]; } - (void)dismissUnifiedSearch:(BOOL)animated completion:(void (^)(void))completion @@ -516,32 +489,7 @@ { UINavigationController *navigationController = [segue destinationViewController]; - // Release existing Room view controller (if any) - if (_currentRoomViewController) - { - // If the displayed data is not a preview, let the manager release the room data source - // (except if the view controller has the room data source ownership). - if (!_currentRoomViewController.roomPreviewData && _currentRoomViewController.roomDataSource && !_currentRoomViewController.hasRoomDataSourceOwnership) - { - MXSession *mxSession = _currentRoomViewController.roomDataSource.mxSession; - MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:mxSession]; - - [roomDataSourceManager closeRoomDataSource:_currentRoomViewController.roomDataSource forceClose:NO]; - } - - [_currentRoomViewController destroy]; - _currentRoomViewController = nil; - } - else if (_currentContactDetailViewController) - { - [_currentContactDetailViewController destroy]; - _currentContactDetailViewController = nil; - } - else if (_currentGroupDetailViewController) - { - [_currentGroupDetailViewController destroy]; - _currentGroupDetailViewController = nil; - } + [self releaseCurrentDetailsViewController]; if ([[segue identifier] isEqualToString:@"showRoomDetails"]) { @@ -701,6 +649,37 @@ } } +- (void)releaseCurrentDetailsViewController +{ + // Release the existing details view controller (if any). + if (_currentRoomViewController) + { + // If the displayed data is not a preview, let the manager release the room data source + // (except if the view controller has the room data source ownership). + if (!_currentRoomViewController.roomPreviewData && _currentRoomViewController.roomDataSource && !_currentRoomViewController.hasRoomDataSourceOwnership) + { + MXSession *mxSession = _currentRoomViewController.roomDataSource.mxSession; + MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:mxSession]; + + // Let the manager release live room data sources where the user is in + [roomDataSourceManager closeRoomDataSource:_currentRoomViewController.roomDataSource forceClose:NO]; + } + + [_currentRoomViewController destroy]; + _currentRoomViewController = nil; + } + else if (_currentContactDetailViewController) + { + [_currentContactDetailViewController destroy]; + _currentContactDetailViewController = nil; + } + else if (_currentGroupDetailViewController) + { + [_currentGroupDetailViewController destroy]; + _currentGroupDetailViewController = nil; + } +} + - (void)setHidden:(BOOL)hidden { _hidden = hidden; diff --git a/Riot/ViewController/RoomParticipantsViewController.m b/Riot/ViewController/RoomParticipantsViewController.m index c4eb6246b..bb72a4198 100644 --- a/Riot/ViewController/RoomParticipantsViewController.m +++ b/Riot/ViewController/RoomParticipantsViewController.m @@ -1302,7 +1302,7 @@ }]; - leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(25, 24)]; + leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(24, 24)]; [actions insertObject:leaveAction atIndex:0]; } diff --git a/Riot/ViewController/RoomSettingsViewController.m b/Riot/ViewController/RoomSettingsViewController.m index 0aae71038..eedec0580 100644 --- a/Riot/ViewController/RoomSettingsViewController.m +++ b/Riot/ViewController/RoomSettingsViewController.m @@ -2899,7 +2899,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti }]; - removeAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(44, 44) resourceSize:CGSizeMake(25, 24)]; + removeAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(44, 44) resourceSize:CGSizeMake(24, 24)]; [actions insertObject:removeAction atIndex:0]; } } diff --git a/Riot/ViewController/SegmentedViewController.h b/Riot/ViewController/SegmentedViewController.h index b6949a7c9..a0a340863 100644 --- a/Riot/ViewController/SegmentedViewController.h +++ b/Riot/ViewController/SegmentedViewController.h @@ -37,6 +37,11 @@ limitations under the License. */ @property (nonatomic) NSUInteger selectedIndex; +/** + The tint color for the section header (kRiotColorGreen by default). + */ +@property (nonatomic) UIColor *sectionHeaderTintColor; + /** The view controller that currently has the focus. */ diff --git a/Riot/ViewController/SegmentedViewController.m b/Riot/ViewController/SegmentedViewController.m index 0d49ed60c..c4d5d4d12 100644 --- a/Riot/ViewController/SegmentedViewController.m +++ b/Riot/ViewController/SegmentedViewController.m @@ -129,6 +129,8 @@ // Setup `MXKViewControllerHandling` properties self.enableBarTintColorStatusChange = NO; + + self.sectionHeaderTintColor = kRiotColorGreen; } - (void)viewDidLoad @@ -244,7 +246,7 @@ label.text = [sectionTitles objectAtIndex:index]; label.font = [UIFont systemFontOfSize:17]; label.textAlignment = NSTextAlignmentCenter; - label.textColor = kRiotColorGreen; + label.textColor = _sectionHeaderTintColor; label.backgroundColor = [UIColor clearColor]; label.accessibilityIdentifier = [NSString stringWithFormat:@"SegmentedVCSectionLabel%tu", index]; @@ -330,7 +332,7 @@ // create the selected marker view selectedMarkerView = [[UIView alloc] init]; - selectedMarkerView.backgroundColor = kRiotColorGreen; + selectedMarkerView.backgroundColor = _sectionHeaderTintColor; [selectedMarkerView setTranslatesAutoresizingMaskIntoConstraints:NO]; [self.selectionContainer addSubview:selectedMarkerView]; diff --git a/Riot/ViewController/SettingsViewController.m b/Riot/ViewController/SettingsViewController.m index 788d25932..e58d4459d 100644 --- a/Riot/ViewController/SettingsViewController.m +++ b/Riot/ViewController/SettingsViewController.m @@ -2324,7 +2324,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(); }]; - leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon_pink" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(50, cellHeight) resourceSize:CGSizeMake(20, 18)]; + leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon_pink" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(50, cellHeight) resourceSize:CGSizeMake(24, 24)]; [actions insertObject:leaveAction atIndex:0]; } } diff --git a/Riot/ViewController/StartChatViewController.m b/Riot/ViewController/StartChatViewController.m index 348e298a4..0021cabba 100644 --- a/Riot/ViewController/StartChatViewController.m +++ b/Riot/ViewController/StartChatViewController.m @@ -452,7 +452,7 @@ }]; - leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(25, 24)]; + leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon" backgroundColor:kRiotSecondaryBgColor patternSize:CGSizeMake(74, 74) resourceSize:CGSizeMake(24, 24)]; [actions insertObject:leaveAction atIndex:0]; }