Browse Source

theming color

Marino Faggiana 8 years ago
parent
commit
9581a98a7f

+ 1 - 1
Picker/DocumentPickerViewController.swift

@@ -129,7 +129,7 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
         hud = CCHud.init(view: self.navigationController?.view)
         hud = CCHud.init(view: self.navigationController?.view)
         
         
         // COLOR
         // COLOR
-        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.navigationBar
+        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
         self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         
         

+ 1 - 1
Share Ext/ShareViewController.m

@@ -172,7 +172,7 @@
 {    
 {    
     UIBarButtonItem *rightButtonUpload, *rightButtonEncrypt, *leftButtonCancel;
     UIBarButtonItem *rightButtonUpload, *rightButtonEncrypt, *leftButtonCancel;
     
     
-    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
     self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     
     
     self.toolBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
     self.toolBar.barTintColor = [NCBrandColor sharedInstance].tabBar;

+ 3 - 10
iOSClient/AppDelegate.m

@@ -876,13 +876,12 @@
         if (capabilities.themingColor.length > 0) {
         if (capabilities.themingColor.length > 0) {
             
             
             UIColor *themingColor = [CCGraphics colorFromHexString:capabilities.themingColor];
             UIColor *themingColor = [CCGraphics colorFromHexString:capabilities.themingColor];
-            NCBrandColor.sharedInstance.navigationBar = themingColor;
-            NCBrandColor.sharedInstance.navigationBarShare = themingColor;
+            NCBrandColor.sharedInstance.brand = themingColor;
         }
         }
     }
     }
     
     
     nav.translucent = NO;
     nav.translucent = NO;
-    nav.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    nav.barTintColor = [NCBrandColor sharedInstance].brand;
     nav.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     nav.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
     [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
     
     
@@ -929,13 +928,7 @@
 
 
 - (void)handleTouchTabbarCenter:(id)sender
 - (void)handleTouchTabbarCenter:(id)sender
 {
 {
-    UIColor *ThemingColor = [NCBrandColor sharedInstance].navigationBar;
-    
-    TableCapabilities *capabilities = [CCCoreData getCapabilitesForAccount:self.activeAccount];
-    if (k_option_use_themingColor == YES && capabilities.themingColor.length > 0)
-        ThemingColor = [CCGraphics colorFromHexString:capabilities.themingColor];
-    
-    CreateMenuAdd *menuAdd = [[CreateMenuAdd alloc] initWithThemingColor:ThemingColor];
+    CreateMenuAdd *menuAdd = [[CreateMenuAdd alloc] initWithThemingColor:[NCBrandColor sharedInstance].brand];
     
     
     if ([CCUtility getCreateMenuEncrypted])
     if ([CCUtility getCreateMenuEncrypted])
         [menuAdd createMenuEncryptedWithView:self.window.rootViewController.view];
         [menuAdd createMenuEncryptedWithView:self.window.rootViewController.view];

+ 0 - 2
iOSClient/Brand/NCBrand.swift

@@ -35,9 +35,7 @@ class NCBrandColor: NSObject {
     public var cryptocloud:             UIColor = UIColor(red: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)
     public var cryptocloud:             UIColor = UIColor(red: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)
     public var groupByBar:              UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.2)
     public var groupByBar:              UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.2)
     public var groupByBarNoBlur:        UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.3)
     public var groupByBarNoBlur:        UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.3)
-    public var navigationBar:           UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
     public var navigationBarProgress:   UIColor = .white
     public var navigationBarProgress:   UIColor = .white
-    public var navigationBarShare:      UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
     public var navigationBarText:       UIColor = .white
     public var navigationBarText:       UIColor = .white
     public var nextcloud:               UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
     public var nextcloud:               UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
     public var menuBackground:          UIColor = .white
     public var menuBackground:          UIColor = .white

+ 3 - 3
iOSClient/Create/CCCreateCloud.swift

@@ -31,7 +31,7 @@ class CreateMenuAdd: NSObject {
 
 
     let fontButton = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
     let fontButton = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
     let fontEncrypted = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.cryptocloud] as [String : Any]
     let fontEncrypted = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.cryptocloud] as [String : Any]
-    let fontCancel = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBar] as [String : Any]
+    let fontCancel = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.brand] as [String : Any]
     let fontDisable = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
     let fontDisable = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
 
 
     let colorLightGray = UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1)
     let colorLightGray = UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1)
@@ -374,7 +374,7 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         self.navigationItem.leftBarButtonItem = cancelButton
         self.navigationItem.leftBarButtonItem = cancelButton
         self.navigationItem.rightBarButtonItem = saveButton
         self.navigationItem.rightBarButtonItem = saveButton
         
         
-        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.navigationBar
+        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
         self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         
         
@@ -522,7 +522,7 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         
         
         viewController.delegate = self;
         viewController.delegate = self;
         viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
         viewController.tintColor = NCBrandColor.sharedInstance.navigationBarText
-        viewController.barTintColor = NCBrandColor.sharedInstance.navigationBar
+        viewController.barTintColor = NCBrandColor.sharedInstance.brand
         viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
         viewController.tintColorTitle = NCBrandColor.sharedInstance.navigationBarText
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.move.title = NSLocalizedString("_select_", comment: "");
         viewController.networkingOperationQueue =  appDelegate.netQueue
         viewController.networkingOperationQueue =  appDelegate.netQueue

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

@@ -237,7 +237,7 @@ static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
     }
     }
     
     
     // color
     // color
-    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
     self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
     [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [NCBrandColor sharedInstance].navigationBarText}];
     
     

+ 1 - 1
iOSClient/Login/CCLoginWeb.swift

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

+ 1 - 12
iOSClient/Main/CCDetail.m

@@ -195,18 +195,7 @@
 
 
 - (void)changeTheming
 - (void)changeTheming
 {
 {
-    if (app.activeAccount.length > 0 && k_option_use_themingColor == YES) {
-        
-        TableCapabilities *capabilities = [CCCoreData getCapabilitesForAccount:app.activeAccount];
-        if (capabilities.themingColor.length > 0) {
-            
-            UIColor *themingColor = [CCGraphics colorFromHexString:capabilities.themingColor];
-            NCBrandColor.sharedInstance.navigationBar = themingColor;
-            NCBrandColor.sharedInstance.navigationBarShare = themingColor;
-        }
-    }
-    
-    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
 }
 }
 
 
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -2343,7 +2343,7 @@
     viewController.move.title = NSLocalizedString(@"_move_", nil);
     viewController.move.title = NSLocalizedString(@"_move_", nil);
     viewController.selectedMetadatas = [self getMetadatasFromSelectedRows:indexPaths];
     viewController.selectedMetadatas = [self getMetadatasFromSelectedRows:indexPaths];
     viewController.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     viewController.tintColor = [NCBrandColor sharedInstance].navigationBarText;
-    viewController.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    viewController.barTintColor = [NCBrandColor sharedInstance].brand;
     viewController.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
     viewController.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
     viewController.networkingOperationQueue = app.netQueue;
     viewController.networkingOperationQueue = app.netQueue;
     
     

+ 1 - 1
iOSClient/Move/CCMove.m

@@ -125,7 +125,7 @@
     }
     }
     
     
     // Toolbar Color
     // Toolbar Color
-    self.navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.navigationBar;
+    self.navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand;
     self.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText;
     self.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText;
     
     
     self.navigationController.toolbar.barTintColor = NCBrandColor.sharedInstance.tabBar;
     self.navigationController.toolbar.barTintColor = NCBrandColor.sharedInstance.tabBar;

+ 1 - 1
iOSClient/Notification/CCNotification.swift

@@ -33,7 +33,7 @@ class CCNotification: UITableViewController, OCNetworkingDelegate {
         super.viewDidLoad()
         super.viewDidLoad()
         
         
         self.navigationController?.navigationBar.topItem?.title = NSLocalizedString("_notification_", comment: "")
         self.navigationController?.navigationBar.topItem?.title = NSLocalizedString("_notification_", comment: "")
-        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.navigationBar
+        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText
         self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
         self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBarText]
 
 

+ 1 - 1
iOSClient/QuickActions/CCQuickActions.m

@@ -195,7 +195,7 @@
     _move.delegate = self;
     _move.delegate = self;
     _move.selectedMetadatas = nil;
     _move.selectedMetadatas = nil;
     _move.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     _move.tintColor = [NCBrandColor sharedInstance].navigationBarText;
-    _move.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    _move.barTintColor = [NCBrandColor sharedInstance].brand;
     _move.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
     _move.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
     _move.networkingOperationQueue = app.netQueue;
     _move.networkingOperationQueue = app.netQueue;
     
     

+ 1 - 1
iOSClient/Share/CCShareInfoCMOC.m

@@ -152,7 +152,7 @@
     [super viewDidLoad];
     [super viewDidLoad];
     
     
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].navigationBarShare;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
     
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;

+ 1 - 1
iOSClient/Share/CCShareOC.m

@@ -123,7 +123,7 @@
     [super viewDidLoad];
     [super viewDidLoad];
     
     
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].navigationBarShare;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
     
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;

+ 1 - 1
iOSClient/Share/CCSharePermissionOC.m

@@ -152,7 +152,7 @@
     [super viewDidLoad];
     [super viewDidLoad];
     
     
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].navigationBarShare;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
     
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;

+ 1 - 1
iOSClient/Share/CCShareUserOC.m

@@ -102,7 +102,7 @@
     self.selectedItems = [[NSMutableArray alloc] init];
     self.selectedItems = [[NSMutableArray alloc] init];
     
     
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
     [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].navigationBarShare;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
     
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;

+ 1 - 1
iOSClient/Templates/CCTemplates.m

@@ -41,7 +41,7 @@
     label.text=titolo;
     label.text=titolo;
     if (!reachability) label.textColor = [NCBrandColor sharedInstance].connectionNo;
     if (!reachability) label.textColor = [NCBrandColor sharedInstance].connectionNo;
     else label.textColor = [NCBrandColor sharedInstance].navigationBarText;
     else label.textColor = [NCBrandColor sharedInstance].navigationBarText;
-    label.backgroundColor = [NCBrandColor sharedInstance].navigationBar;
+    label.backgroundColor = [NCBrandColor sharedInstance].brand;
     label.textAlignment = NSTextAlignmentCenter;
     label.textAlignment = NSTextAlignmentCenter;
     navItem.titleView=label;
     navItem.titleView=label;
 }
 }

+ 1 - 1
iOSClient/UploadFromOtherUpp/CCUploadFromOtherUpp.m

@@ -173,7 +173,7 @@
     viewController.delegate = self;
     viewController.delegate = self;
     viewController.move.title = NSLocalizedString(@"_select_", nil);
     viewController.move.title = NSLocalizedString(@"_select_", nil);
     viewController.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     viewController.tintColor = [NCBrandColor sharedInstance].navigationBarText;
-    viewController.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    viewController.barTintColor = [NCBrandColor sharedInstance].brand;
     viewController.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
     viewController.tintColorTitle = [NCBrandColor sharedInstance].navigationBarText;
     viewController.networkingOperationQueue = app.netQueue;
     viewController.networkingOperationQueue = app.netQueue;