Browse Source

Modify NCBrandColor

Marino Faggiana 7 years ago
parent
commit
47fd1ff994

+ 2 - 2
Picker/DocumentPickerViewController.swift

@@ -134,8 +134,8 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
         
         // COLOR
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         self.navigationController?.navigationBar.isTranslucent = false
         
         self.tableView.separatorColor = NCBrandColor.sharedInstance.seperator

+ 1 - 1
Share/ShareViewController.m

@@ -151,7 +151,7 @@
             [NCBrandColor sharedInstance].brand = newColor;
     }
     self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
-    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].brandText;
     
     self.toolBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
     self.toolBar.tintColor = [NCBrandColor sharedInstance].brand;

+ 2 - 2
iOSClient/AppDelegate.m

@@ -917,8 +917,8 @@
 {
     nav.translucent = NO;
     nav.barTintColor = [NCBrandColor sharedInstance].brand;
-    nav.tintColor = [NCBrandColor sharedInstance].navigationBarText;
-    [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
+    nav.tintColor = [NCBrandColor sharedInstance].brandText;
+    [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].brandText}];
     // Change bar bottom line shadow
     nav.shadowImage = [CCGraphics generateSinglePixelImageWithColor:[NCBrandColor sharedInstance].brand];
     

+ 14 - 15
iOSClient/Brand/NCBrand.swift

@@ -31,22 +31,21 @@ class NCBrandColor: NSObject {
     }()
 
     // Color
-    @objc public let customer:                UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
+    @objc public let customer:              UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
 
-    @objc public var brand:                   UIColor
-    @objc public var connectionNo:            UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
-    @objc public var encrypted:               UIColor = .red
-    @objc public var navigationBarProgress:   UIColor = .white
-    @objc public var navigationBarText:       UIColor = .white
-    @objc public var menuBackground:          UIColor = .white
-    @objc public var moreNormal:              UIColor = .black
-    @objc public var moreSettings:            UIColor = .black
-    @objc public var seperator:               UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
-    @objc public var tabBar:                  UIColor = .white
-    @objc public var tableBackground:         UIColor = .white
-    @objc public var transferBackground:      UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
-    @objc public let nextcloud:               UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
-    @objc public var text:                    UIColor = .white
+    @objc public var brand:                 UIColor
+    @objc public var brandText:             UIColor = .white
+
+    @objc public var connectionNo:          UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
+    @objc public var encrypted:             UIColor = .red
+    @objc public var menuBackground:        UIColor = .white
+    @objc public var moreNormal:            UIColor = .black
+    @objc public var moreSettings:          UIColor = .black
+    @objc public var seperator:             UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
+    @objc public var tabBar:                UIColor = .white
+    @objc public var tableBackground:       UIColor = .white
+    @objc public var transferBackground:    UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
+    @objc public let nextcloud:             UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
 
     override init() {
         self.brand = self.customer

+ 8 - 8
iOSClient/Create/CCCreateCloud.swift

@@ -327,8 +327,8 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         
         self.navigationController?.navigationBar.isTranslucent = false
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         
         self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
         
@@ -485,9 +485,9 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         let viewController : CCMove = navigationController.topViewController as! CCMove
         
         viewController.delegate = self;
-        viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColor = NCBrandColor.sharedInstance.brandText
         viewController.barTintColor = NCBrandColor.sharedInstance.brand
-        viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColorTitle = NCBrandColor.sharedInstance.brandText
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.networkingOperationQueue =  appDelegate.netQueue
         
@@ -586,8 +586,8 @@ class CreateFormUploadFile: XLFormViewController, CCMoveDelegate {
         
         self.navigationController?.navigationBar.isTranslucent = false
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         
         self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
         self.tableView.backgroundColor = NCBrandColor.sharedInstance.tableBackground
@@ -675,9 +675,9 @@ class CreateFormUploadFile: XLFormViewController, CCMoveDelegate {
         let viewController : CCMove = navigationController.topViewController as! CCMove
         
         viewController.delegate = self;
-        viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColor = NCBrandColor.sharedInstance.brandText
         viewController.barTintColor = NCBrandColor.sharedInstance.brand
-        viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
+        viewController.tintColorTitle = NCBrandColor.sharedInstance.brandText
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.networkingOperationQueue =  appDelegate.netQueue
         

+ 2 - 2
iOSClient/Library/MWPhotoBrowser/MWPhotoBrowser.m

@@ -221,8 +221,8 @@ static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
     
     // color
     self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
-    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
-    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
+    self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].brandText;
+    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].brandText}];
     self.navigationController.navigationBar.translucent = false;
     [self setExtendedLayoutIncludesOpaqueBars:YES];
     

+ 1 - 1
iOSClient/Login/CCLoginWeb.swift

@@ -38,7 +38,7 @@ public class CCLoginWeb: UIViewController {
             doneButtonVisible = true
         }
         
-        let webVC = SwiftModalWebVC(urlString: NCBrandOptions.sharedInstance.loginBaseUrl, theme: .custom, color: NCBrandColor.sharedInstance.brand, colorText: NCBrandColor.sharedInstance.navigationBarText, doneButtonVisible: doneButtonVisible, hideToolbar: true)
+        let webVC = SwiftModalWebVC(urlString: NCBrandOptions.sharedInstance.loginBaseUrl, theme: .custom, color: NCBrandColor.sharedInstance.brand, colorText: NCBrandColor.sharedInstance.brandText, doneButtonVisible: doneButtonVisible, hideToolbar: true)
         webVC.delegateWeb = self
 
         vc.present(webVC, animated: false, completion: nil)

+ 6 - 6
iOSClient/Main/CCMain.m

@@ -510,7 +510,7 @@
 {
     _refreshControl = [UIRefreshControl new];
    
-    _refreshControl.tintColor = [NCBrandColor sharedInstance].text;
+    _refreshControl.tintColor = [NCBrandColor sharedInstance].brandText;
     _refreshControl.backgroundColor = [NCBrandColor sharedInstance].brand;
     [self setRefreshControl:_refreshControl];
     
@@ -576,7 +576,7 @@
                 label.text = _titleMain;
                 [label sizeToFit];
                 label.center = navView.center;
-                label.textColor = [NCBrandColor sharedInstance].text;
+                label.textColor = [NCBrandColor sharedInstance].brandText;
                 label.textAlignment = NSTextAlignmentCenter;
             
                 CGFloat correct = 6;
@@ -615,7 +615,7 @@
     if ([app.listOfNotifications count] > 0) {
         
         buttonNotification = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"notification"] style:UIBarButtonItemStylePlain target:self action:@selector(viewNotification)];
-        buttonNotification.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+        buttonNotification.tintColor = [NCBrandColor sharedInstance].brandText;
         buttonNotification.enabled = true;
     }
     
@@ -1871,7 +1871,7 @@
         self.searchController.searchBar.backgroundColor = [NCBrandColor sharedInstance].brand;
         self.searchController.searchBar.backgroundImage = [UIImage new];
         // Color Text "Cancel"
-        [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:[NCBrandColor sharedInstance].text];
+        [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:[NCBrandColor sharedInstance].brandText];
         
         self.tableView.tableHeaderView = self.searchController.searchBar;
         [self.tableView setContentOffset:CGPointMake(0, self.searchController.searchBar.frame.size.height - self.tableView.contentOffset.y)];
@@ -2292,9 +2292,9 @@
 
     viewController.delegate = self;
     viewController.move.title = NSLocalizedString(@"_move_", nil);
-    viewController.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    viewController.tintColor = [NCBrandColor sharedInstance].brandText;
     viewController.barTintColor = [NCBrandColor sharedInstance].brand;
-    viewController.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
+    viewController.tintColorTitle = [NCBrandColor sharedInstance].brandText;
     viewController.networkingOperationQueue = app.netQueue;
     
     [navigationController setModalPresentationStyle:UIModalPresentationFormSheet];

+ 2 - 2
iOSClient/Move/CCMove.m

@@ -85,7 +85,7 @@
         UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(0,0, self.navigationItem.titleView.frame.size.width, 40)];
         label.text = self.passMetadata.fileNameView;
         
-        label.textColor = NCBrandColor.sharedInstance.navigationBarText;
+        label.textColor = NCBrandColor.sharedInstance.brandText;
         
         label.backgroundColor =[UIColor clearColor];
         label.textAlignment = NSTextAlignmentCenter;
@@ -108,7 +108,7 @@
     [super viewWillAppear:animated];
     
     self.navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand;
-    self.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText;
+    self.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText;
     
     self.navigationController.toolbar.barTintColor = NCBrandColor.sharedInstance.tabBar;
     self.navigationController.toolbar.tintColor = NCBrandColor.sharedInstance.brand;

+ 2 - 2
iOSClient/Notification/CCNotification.swift

@@ -34,8 +34,8 @@ class CCNotification: UITableViewController, OCNetworkingDelegate {
         
         self.navigationController?.navigationBar.topItem?.title = NSLocalizedString("_notification_", comment: "")
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         self.navigationController?.navigationBar.isTranslucent = false
 
         self.navigationItem.setRightBarButton(UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(viewClose)), animated: true)

+ 2 - 2
iOSClient/QuickActions/CCQuickActions.m

@@ -160,9 +160,9 @@
     
     _move.move.title = NSLocalizedString(@"_upload_file_", nil);
     _move.delegate = self;
-    _move.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    _move.tintColor = [NCBrandColor sharedInstance].brandText;
     _move.barTintColor = [NCBrandColor sharedInstance].brand;
-    _move.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
+    _move.tintColorTitle = [NCBrandColor sharedInstance].brandText;
     _move.networkingOperationQueue = app.netQueue;
     
     [navigationController setModalPresentationStyle:UIModalPresentationFormSheet];

+ 2 - 2
iOSClient/Settings/NCManageAutoUploadFileName.swift

@@ -127,8 +127,8 @@ class NCManageAutoUploadFileName: XLFormViewController {
         
         self.navigationController?.navigationBar.isTranslucent = false
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         
         self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
         

+ 3 - 3
iOSClient/Text/NCText.swift

@@ -46,11 +46,11 @@ class NCText: UIViewController, UITextViewDelegate {
 
         self.navigationController?.navigationBar.topItem?.title = NSLocalizedString("_untitled_txt_", comment: "")
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.navigationBarText]
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: NCBrandColor.sharedInstance.brandText]
         self.navigationController?.navigationBar.isTranslucent = false
 
-        self.navigationController?.toolbar.barTintColor = NCBrandColor.sharedInstance.navigationBarText
+        self.navigationController?.toolbar.barTintColor = NCBrandColor.sharedInstance.brandText
         self.navigationController?.toolbar.tintColor = NCBrandColor.sharedInstance.brand
         
         cancelButton.title = NSLocalizedString("_cancel_", comment: "")

+ 2 - 2
iOSClient/UploadFromOtherUpp/CCUploadFromOtherUpp.m

@@ -157,9 +157,9 @@
     CCMove *viewController = (CCMove *)navigationController.topViewController;
     viewController.delegate = self;
     viewController.move.title = NSLocalizedString(@"_select_", nil);
-    viewController.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    viewController.tintColor = [NCBrandColor sharedInstance].brandText;
     viewController.barTintColor = [NCBrandColor sharedInstance].brand;
-    viewController.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
+    viewController.tintColorTitle = [NCBrandColor sharedInstance].brandText;
     viewController.networkingOperationQueue = app.netQueue;
 
     [self presentViewController:navigationController animated:YES completion:nil];