diff --git a/Vector/Utils/VectorDesignValues.h b/Vector/Utils/VectorDesignValues.h index 6f89d9b08..c03e21ccd 100644 --- a/Vector/Utils/VectorDesignValues.h +++ b/Vector/Utils/VectorDesignValues.h @@ -36,6 +36,9 @@ extern UIColor *kVectorColorOrange; extern UIColor *kVectorTextColorBlack; extern UIColor *kVectorTextColorGray; +#pragma mark - Vector Navigation Bar Tint Color +extern UIColor *kVectorNavBarTintColor; + /** `VectorDesignValues` class manages the Vector design parameters */ diff --git a/Vector/Utils/VectorDesignValues.m b/Vector/Utils/VectorDesignValues.m index de12bf402..a20a853ba 100644 --- a/Vector/Utils/VectorDesignValues.m +++ b/Vector/Utils/VectorDesignValues.m @@ -25,6 +25,8 @@ UIColor *kVectorColorOrange; UIColor *kVectorTextColorBlack; UIColor *kVectorTextColorGray; +UIColor *kVectorNavBarTintColor; + @implementation VectorDesignValues + (void)load @@ -40,6 +42,8 @@ UIColor *kVectorTextColorGray; kVectorTextColorBlack = [UIColor colorWithRed:(60.0 / 255.0) green:(60.0 / 255.0) blue:(60.0 / 255.0) alpha:1.0]; kVectorTextColorGray = [UIColor colorWithRed:(157.0 / 255.0) green:(157.0 / 255.0) blue:(157.0 / 255.0) alpha:1.0]; + + kVectorNavBarTintColor = kVectorColorLightGrey; // Colors copied from Vector web kVectorColorLightGreen = UIColorFromRGB(0x50e2c2); diff --git a/Vector/ViewController/AccountDetailsViewController.m b/Vector/ViewController/AccountDetailsViewController.m index 2226721b0..e279ed45d 100644 --- a/Vector/ViewController/AccountDetailsViewController.m +++ b/Vector/ViewController/AccountDetailsViewController.m @@ -16,6 +16,8 @@ #import "AccountDetailsViewController.h" +#import "VectorDesignValues.h" + #import "RageShakeManager.h" @interface AccountDetailsViewController() @@ -34,7 +36,9 @@ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. - // Setup `MXKRoomMemberListViewController` properties + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; } diff --git a/Vector/ViewController/AuthenticationViewController.m b/Vector/ViewController/AuthenticationViewController.m index 11be64f02..d2c4dab46 100644 --- a/Vector/ViewController/AuthenticationViewController.m +++ b/Vector/ViewController/AuthenticationViewController.m @@ -40,7 +40,9 @@ { [super viewDidLoad]; - // Setup `MXKAuthenticationViewController` properties + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; self.mainNavigationItem.title = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; diff --git a/Vector/ViewController/DirectoryViewController.m b/Vector/ViewController/DirectoryViewController.m index 8480a8088..48a54913d 100644 --- a/Vector/ViewController/DirectoryViewController.m +++ b/Vector/ViewController/DirectoryViewController.m @@ -20,6 +20,10 @@ #import "AppDelegate.h" +#import "VectorDesignValues.h" + +#import "RageShakeManager.h" + @interface DirectoryViewController () { PublicRoomsDirectoryDataSource *dataSource; @@ -32,6 +36,11 @@ - (void)viewDidLoad { [super viewDidLoad]; + + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; self.title = NSLocalizedStringFromTable(@"directory_title", @"Vector", nil); diff --git a/Vector/ViewController/GlobalNotificationSettingsViewController.m b/Vector/ViewController/GlobalNotificationSettingsViewController.m index e1b65b610..cd284a261 100644 --- a/Vector/ViewController/GlobalNotificationSettingsViewController.m +++ b/Vector/ViewController/GlobalNotificationSettingsViewController.m @@ -16,6 +16,8 @@ #import "GlobalNotificationSettingsViewController.h" +#import "VectorDesignValues.h" + #import "RageShakeManager.h" @implementation GlobalNotificationSettingsViewController @@ -25,7 +27,9 @@ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. - // Setup `MXKRoomMemberListViewController` properties + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; } @end diff --git a/Vector/ViewController/HomeSearchViewController.m b/Vector/ViewController/HomeSearchViewController.m index 724dded02..3786fa0a2 100644 --- a/Vector/ViewController/HomeSearchViewController.m +++ b/Vector/ViewController/HomeSearchViewController.m @@ -21,11 +21,20 @@ #import "EventFormatter.h" +#import "VectorDesignValues.h" + +#import "RageShakeManager.h" + @implementation HomeSearchViewController - (void)viewDidLoad { [super viewDidLoad]; + + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; [self.searchTableView registerNib:HomeSearchTableViewCell.nib forCellReuseIdentifier:HomeSearchTableViewCell.defaultReuseIdentifier]; diff --git a/Vector/ViewController/HomeViewController.m b/Vector/ViewController/HomeViewController.m index 7d1720323..e19849444 100644 --- a/Vector/ViewController/HomeViewController.m +++ b/Vector/ViewController/HomeViewController.m @@ -66,6 +66,8 @@ [self initWithTitles:titles viewControllers:viewControllers defaultSelected:0]; [super viewDidLoad]; + + // The navigation bar tint color and the rageShake Manager are handled by super (see SegmentedViewController) self.navigationItem.title = NSLocalizedStringFromTable(@"title_recents", @"Vector", nil); diff --git a/Vector/ViewController/MediaAlbumContentViewController.m b/Vector/ViewController/MediaAlbumContentViewController.m index 513048a62..9b98820d5 100644 --- a/Vector/ViewController/MediaAlbumContentViewController.m +++ b/Vector/ViewController/MediaAlbumContentViewController.m @@ -16,6 +16,9 @@ #import "MediaAlbumContentViewController.h" +#import "VectorDesignValues.h" + +#import "RageShakeManager.h" @interface MediaAlbumContentViewController () { @@ -55,6 +58,11 @@ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; + // Register collection view cell class [self.assetsCollectionView registerClass:MXKMediaCollectionViewCell.class forCellWithReuseIdentifier:[MXKMediaCollectionViewCell defaultReuseIdentifier]]; diff --git a/Vector/ViewController/MediaPickerViewController.m b/Vector/ViewController/MediaPickerViewController.m index 41c77eba3..fb79d0206 100644 --- a/Vector/ViewController/MediaPickerViewController.m +++ b/Vector/ViewController/MediaPickerViewController.m @@ -24,6 +24,10 @@ #import "MediaAlbumTableCell.h" +#import "VectorDesignValues.h" + +#import "RageShakeManager.h" + static void *CapturingStillImageContext = &CapturingStillImageContext; static void *RecordingContext = &RecordingContext; @@ -90,6 +94,11 @@ static void *RecordingContext = &RecordingContext; [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onButtonPressed:)]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"camera", @"Vector", nil) style:UIBarButtonItemStylePlain target:self action:@selector(onButtonPressed:)]; diff --git a/Vector/ViewController/RecentsViewController.m b/Vector/ViewController/RecentsViewController.m index e73ca770a..7d0aafd28 100644 --- a/Vector/ViewController/RecentsViewController.m +++ b/Vector/ViewController/RecentsViewController.m @@ -64,7 +64,9 @@ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. - // Setup `MXKRecentListViewController` properties + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; // Register here the customized cell view class used to render recents diff --git a/Vector/ViewController/RoomCreationStep1ViewController.m b/Vector/ViewController/RoomCreationStep1ViewController.m index 97110cf8f..3b7756f4c 100644 --- a/Vector/ViewController/RoomCreationStep1ViewController.m +++ b/Vector/ViewController/RoomCreationStep1ViewController.m @@ -17,6 +17,8 @@ #import "RoomCreationStep1ViewController.h" #import "RoomCreationStep2ViewController.h" +#import "VectorDesignValues.h" + #import "RageShakeManager.h" #import "NSBundle+MatrixKit.h" @@ -55,6 +57,8 @@ // Do any additional setup after loading the view, typically from a nib. // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; inputs = [[MXKRoomCreationInputs alloc] init]; diff --git a/Vector/ViewController/RoomCreationStep2ViewController.m b/Vector/ViewController/RoomCreationStep2ViewController.m index 63c03a511..84d4045f1 100644 --- a/Vector/ViewController/RoomCreationStep2ViewController.m +++ b/Vector/ViewController/RoomCreationStep2ViewController.m @@ -38,6 +38,8 @@ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. + // The navigation bar tint color and the rageShake Manager are handled by super (see RoomParticipantsViewController) + self.navigationItem.title = NSLocalizedStringFromTable(@"room_creation_title", @"Vector", nil); createBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"create", @"Vector", nil) style:UIBarButtonItemStylePlain target:self action:@selector(onButtonPressed:)]; diff --git a/Vector/ViewController/RoomParticipantsViewController.m b/Vector/ViewController/RoomParticipantsViewController.m index 7c143e288..3bb7bed71 100644 --- a/Vector/ViewController/RoomParticipantsViewController.m +++ b/Vector/ViewController/RoomParticipantsViewController.m @@ -16,11 +16,12 @@ #import "RoomParticipantsViewController.h" +#import "VectorDesignValues.h" + #import "RageShakeManager.h" #import "AppDelegate.h" -#import "VectorDesignValues.h" #import "AvatarGenerator.h" #import "Contact.h" @@ -69,6 +70,8 @@ // Do any additional setup after loading the view, typically from a nib. // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; self.navigationItem.title = NSLocalizedStringFromTable(@"room_participants_title", @"Vector", nil); diff --git a/Vector/ViewController/RoomSearchViewController.m b/Vector/ViewController/RoomSearchViewController.m index 81348a272..b3ad023e9 100644 --- a/Vector/ViewController/RoomSearchViewController.m +++ b/Vector/ViewController/RoomSearchViewController.m @@ -22,12 +22,20 @@ #import "RoomIncomingAttachmentBubbleCell.h" #import "RoomIncomingTextMsgBubbleCell.h" +#import "VectorDesignValues.h" + +#import "RageShakeManager.h" @implementation RoomSearchViewController - (void)viewDidLoad { [super viewDidLoad]; + + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; // Hide line separators of empty cells self.searchTableView.tableFooterView = [[UIView alloc] init]; diff --git a/Vector/ViewController/RoomSettingsViewController.m b/Vector/ViewController/RoomSettingsViewController.m index a6c45b4f5..9d62b16f1 100644 --- a/Vector/ViewController/RoomSettingsViewController.m +++ b/Vector/ViewController/RoomSettingsViewController.m @@ -97,6 +97,11 @@ { [super viewDidLoad]; + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; + // TODO use a color panel // not an hard coded one. CGFloat item = (242.0f / 255.0); @@ -104,9 +109,6 @@ self.tableView.backgroundColor = [UIColor colorWithRed:item green:item blue:item alpha:item]; self.tableView.separatorColor = [UIColor clearColor]; - // Setup `RoomSettingsViewController` properties - self.rageShakeManager = [RageShakeManager sharedManager]; - [self setNavBarButtons]; } diff --git a/Vector/ViewController/RoomViewController.m b/Vector/ViewController/RoomViewController.m index 9e557a92c..c45ecc8ec 100644 --- a/Vector/ViewController/RoomViewController.m +++ b/Vector/ViewController/RoomViewController.m @@ -19,6 +19,9 @@ #import "RoomDataSource.h" #import "AppDelegate.h" + +#import "VectorDesignValues.h" + #import "RageShakeManager.h" #import "RoomInputToolbarView.h" @@ -80,6 +83,9 @@ { [super viewDidLoad]; + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + // Register first customized cell view classes used to render bubbles [self.bubblesTableView registerClass:RoomIncomingTextMsgBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgBubbleCell.defaultReuseIdentifier]; [self.bubblesTableView registerClass:RoomIncomingTextMsgWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; diff --git a/Vector/ViewController/SegmentedViewController.m b/Vector/ViewController/SegmentedViewController.m index 749f246ff..6b27f1851 100644 --- a/Vector/ViewController/SegmentedViewController.m +++ b/Vector/ViewController/SegmentedViewController.m @@ -18,6 +18,8 @@ #import "VectorDesignValues.h" +#import "RageShakeManager.h" + @interface SegmentedViewController () { // list of displayed UIViewControllers @@ -117,6 +119,11 @@ - (void)viewDidLoad { [super viewDidLoad]; + + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; + self.rageShakeManager = [RageShakeManager sharedManager]; // Check whether the view controller has been pushed via storyboard if (!self.viewControllerContainer) diff --git a/Vector/ViewController/SettingsViewController.m b/Vector/ViewController/SettingsViewController.m index d534c3bab..be2d4b3f8 100644 --- a/Vector/ViewController/SettingsViewController.m +++ b/Vector/ViewController/SettingsViewController.m @@ -118,7 +118,9 @@ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. - // Setup `MXKRoomMemberListViewController` properties + // Setup `MXKViewControllerHandling` properties + self.defaultBarTintColor = kVectorNavBarTintColor; + self.enableBarTintColorStatusChange = NO; self.rageShakeManager = [RageShakeManager sharedManager]; self.tableView.backgroundColor = kVectorColorLightGrey;