Browse Source

Theming color

Marino Faggiana 8 years ago
parent
commit
e88bb27be6

+ 1 - 1
Share Ext/ShareViewController.m

@@ -176,7 +176,7 @@
     self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     
     self.toolBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
-    self.toolBar.tintColor = [NCBrandColor sharedInstance].tabBarText;
+    self.toolBar.tintColor = [NCBrandColor sharedInstance].brand;
     
     // Upload
     if (self.localCryptated && _isCryptoCloudMode) {

+ 5 - 5
iOSClient/AppDelegate.m

@@ -235,9 +235,6 @@
     //[[AVAudioSession sharedInstance] setActive:YES error:nil];
     [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
     
-    // Tint Color GLOBAL WINDOW
-    [self.window setTintColor:[NCBrandColor sharedInstance].windowTintcolor];
-    
     UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
     //UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
     UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
@@ -755,7 +752,7 @@
             backgroundColor = [UIColor colorWithRed:0.588 green:0.797 blue:0.000 alpha:0.90];
             break;
         case TWMessageBarMessageTypeInfo:
-            backgroundColor = [NCBrandColor sharedInstance].messageInfoBackground;
+            backgroundColor = [NCBrandColor sharedInstance].nextcloud;
             break;
         default:
             break;
@@ -900,7 +897,7 @@
 {
     tab.translucent = NO;
     tab.barTintColor = [NCBrandColor sharedInstance].tabBar;
-    tab.tintColor = [NCBrandColor sharedInstance].tabBarText;
+    tab.tintColor = [NCBrandColor sharedInstance].brand;
     
     tab.hidden = hidden;
     
@@ -999,6 +996,9 @@
                 [[NSNotificationCenter defaultCenter] postNotificationName:@"changeTheming" object:nil];
         }
     }
+    
+    // Tint Color GLOBAL WINDOW
+    [self.window setTintColor:[NCBrandColor sharedInstance].brand];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 0 - 6
iOSClient/Brand/NCBrand.swift

@@ -33,23 +33,17 @@ class NCBrandColor: NSObject {
     public var brand:                   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 connectionNo:            UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.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 groupByBarNoBlur:        UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.3)
     public var navigationBarProgress:   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 menuBackground:          UIColor = .white
-    public var messageInfoBackground:   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 moreNormal:              UIColor = .black
     public var moreSettings:            UIColor = .black
-    public var refreshControl:          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 selectBackgrond:         UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.1)
     public var seperator:               UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
     public var tabBar:                  UIColor = .white
-    public var tabBarText:              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 tableBackground:         UIColor = .white
     public var transferBackground:      UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
-    public var windowTintcolor:         UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
 }
 
 class NCBrandImages: NSObject {

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

@@ -168,7 +168,7 @@ static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
 	
     // Toolbar
     _toolbar = [[UIToolbar alloc] initWithFrame:[self frameForToolbarAtOrientation:[[UIApplication sharedApplication] statusBarOrientation]]];
-    _toolbar.tintColor = [NCBrandColor sharedInstance].tabBarText; //TWS
+    _toolbar.tintColor = [NCBrandColor sharedInstance].brand; //TWS
     _toolbar.barTintColor = [NCBrandColor sharedInstance].tabBar;
     [_toolbar setBackgroundImage:nil forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
     [_toolbar setBackgroundImage:nil forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsCompact];

+ 3 - 3
iOSClient/Main/CCMain.m

@@ -522,7 +522,7 @@
 - (void)createRefreshControl
 {
     _refreshControl = [UIRefreshControl new];
-    _refreshControl.tintColor = [NCBrandColor sharedInstance].refreshControl;
+    _refreshControl.tintColor = [NCBrandColor sharedInstance].brand;
     _refreshControl.backgroundColor = [UIColor colorWithRed:235.0/255.0 green:235.0/255.0 blue:235.0/255.0 alpha:1.0];
     [_refreshControl addTarget:self action:@selector(refreshControlTarget) forControlEvents:UIControlEventValueChanged];
     [self setRefreshControl:_refreshControl];
@@ -4857,14 +4857,14 @@
     if ([currentDevice rangeOfString:@"iPad3"].location != NSNotFound) {
         
         visualEffectView = [[UIVisualEffectView alloc] init];
-        visualEffectView.backgroundColor = [NCBrandColor sharedInstance].groupByBarNoBlur;
+        visualEffectView.backgroundColor = [[NCBrandColor sharedInstance].brand colorWithAlphaComponent:0.3];
         
     } else {
         
         UIVisualEffect *blurEffect;
         blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
         visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
-        visualEffectView.backgroundColor = [NCBrandColor sharedInstance].groupByBar;
+        visualEffectView.backgroundColor = [[NCBrandColor sharedInstance].brand colorWithAlphaComponent:0.2];
     }
     
     if ([_directoryGroupBy isEqualToString:@"alphabetic"]) {

+ 1 - 1
iOSClient/Move/CCMove.m

@@ -129,7 +129,7 @@
     self.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.navigationBarText;
     
     self.navigationController.toolbar.barTintColor = NCBrandColor.sharedInstance.tabBar;
-    self.navigationController.toolbar.tintColor = NCBrandColor.sharedInstance.tabBarText;
+    self.navigationController.toolbar.tintColor = NCBrandColor.sharedInstance.brand;
     
     // read folder
     [self readFolder];