Browse Source

Change color

Marino Faggiana 8 years ago
parent
commit
9c4b694a66

+ 6 - 1
iOSClient/Brand/NCBrand.swift

@@ -30,6 +30,7 @@ class NCBrandColor: NSObject {
         return instance
     }()
 
+    // Color
     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)
@@ -40,11 +41,15 @@ class NCBrandColor: NSObject {
     public var menuBackground:          UIColor = .white
     public var moreNormal:              UIColor = .black
     public var moreSettings:            UIColor = .black
-    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 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)
+    
+    // Color modify
+    public func getColorSelectBackgrond() -> UIColor {
+        return self.brand.withAlphaComponent(0.1)
+    }
 }
 
 class NCBrandImages: NSObject {

+ 1 - 1
iOSClient/Favorites/CCFavorites.m

@@ -538,7 +538,7 @@
         
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
-    selectionColor.backgroundColor = [NCBrandColor sharedInstance].selectBackgrond;
+    selectionColor.backgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     cell.selectedBackgroundView = selectionColor;
     
     metadata = [_dataSource objectAtIndex:indexPath.row];

+ 1 - 1
iOSClient/Local storage/CCLocalStorage.m

@@ -415,7 +415,7 @@
     
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
-    selectionColor.backgroundColor = [NCBrandColor sharedInstance].selectBackgrond;
+    selectionColor.backgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     cell.selectedBackgroundView = selectionColor;
 
     NSString *cameraFolderName = [CCCoreData getCameraUploadFolderNameActiveAccount:app.activeAccount];

+ 3 - 3
iOSClient/Main/CCMain.m

@@ -3539,7 +3539,7 @@
     app.reMainMenu.textOffset = CGSizeMake(50, 0.0);
     app.reMainMenu.font = [UIFont systemFontOfSize:14.0];
     
-    app.reMainMenu.highlightedBackgroundColor = [NCBrandColor sharedInstance].selectBackgrond;
+    app.reMainMenu.highlightedBackgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     app.reMainMenu.highlightedSeparatorColor = nil;
     app.reMainMenu.highlightedTextColor = [UIColor blackColor];
     app.reMainMenu.highlightedTextShadowColor = nil;
@@ -3679,7 +3679,7 @@
     app.reSelectMenu.textOffset = CGSizeMake(50, 0.0);
     app.reSelectMenu.font = [UIFont systemFontOfSize:14.0];
     
-    app.reSelectMenu.highlightedBackgroundColor = [NCBrandColor sharedInstance].selectBackgrond;
+    app.reSelectMenu.highlightedBackgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     app.reSelectMenu.highlightedSeparatorColor = nil;
     app.reSelectMenu.highlightedTextColor = [UIColor blackColor];
     app.reSelectMenu.highlightedTextShadowColor = nil;
@@ -4976,7 +4976,7 @@
     
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
-    selectionColor.backgroundColor = [NCBrandColor sharedInstance].selectBackgrond;
+    selectionColor.backgroundColor = [[NCBrandColor sharedInstance] getColorSelectBackgrond];
     cell.selectedBackgroundView = selectionColor;
     
     if ([typeCell isEqualToString:@"CellMain"]) cell.backgroundColor = [UIColor whiteColor];

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -248,7 +248,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
         // change color selection and disclosure indicator
         let selectionColor : UIView = UIView.init()
-        selectionColor.backgroundColor = NCBrandColor.sharedInstance.selectBackgrond
+        selectionColor.backgroundColor = NCBrandColor.sharedInstance.getColorSelectBackgrond()
         cell.selectedBackgroundView = selectionColor
         
         cell.accessoryType = UITableViewCellAccessoryType.disclosureIndicator

+ 1 - 1
iOSClient/Notification/CCNotification.swift

@@ -159,7 +159,7 @@ class CCNotification: UITableViewController, OCNetworkingDelegate {
         let cell = self.tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! CCNotificationCell
         
         let selectionColor : UIView = UIView.init()
-        selectionColor.backgroundColor = NCBrandColor.sharedInstance.selectBackgrond
+        selectionColor.backgroundColor = NCBrandColor.sharedInstance.getColorSelectBackgrond()
         cell.selectedBackgroundView = selectionColor
         
         if self.resultSearchController.isActive {