Browse Source

Add k_option_use_themingColor

Marino Faggiana 8 years ago
parent
commit
dcfb7f7619
2 changed files with 8 additions and 6 deletions
  1. 1 0
      iOSClient/Brand/NCBrandConstant.h
  2. 7 6
      iOSClient/Main/CCMain.m

+ 1 - 0
iOSClient/Brand/NCBrandConstant.h

@@ -38,6 +38,7 @@
 #define k_option_use_login_web                  NO
 #define k_option_use_firebase                   NO
 #define k_option_use_default_automatic_upload   NO
+#define k_option_use_themingColor               YES
 
 #define k_option_disable_intro                  NO
 #define k_option_disable_request_login_url      NO

+ 7 - 6
iOSClient/Main/CCMain.m

@@ -1192,12 +1192,13 @@
 {
     app.capabilities = capabilities;
     
-    /*
-    UIColor *x =  [CCGraphics colorFromHexString:capabilities.themingColor];
-    UIColor *Y = [NCColor sharedInstance].colorBrand;
-    [NCColor sharedInstance].colorBrand = x;
-    Y = [NCColor sharedInstance].colorBrand;
-    */
+    if (k_option_use_themingColor == YES) {
+        
+        UIColor *themingColor =  [CCGraphics colorFromHexString:capabilities.themingColor];
+        NCBrandColor.sharedInstance.navigationBar = themingColor;
+        NCBrandColor.sharedInstance.navigationBarShare = themingColor;
+        self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].navigationBar;
+    }
     
     // Search bar if change version
     if (app.serverVersion != capabilities.versionMajor) {