Ver Fonte

dark mode

marinofaggiana há 5 anos atrás
pai
commit
e36f064148

+ 3 - 5
iOSClient/Brand/NCBrand.swift

@@ -54,6 +54,7 @@ class NCBrandColor: NSObject {
     @objc public let graySoft:              UIColor = UIColor(red: 162.0/255.0, green: 162.0/255.0, blue: 162.0/255.0, alpha: 0.5)
     @objc public let yellowFavorite:        UIColor = UIColor(red: 248.0/255.0, green: 205.0/255.0, blue: 70.0/255.0, alpha: 1.0)
     @objc public let textInfo:              UIColor = UIColor(red: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 1.0)
+    @objc public var select:                UIColor = .white
 
     override init() {
         self.brand = self.customer
@@ -70,6 +71,7 @@ class NCBrandColor: NSObject {
             backgroundForm = UIColor(red: 50.0/255.0, green: 50.0/255.0, blue: 50.0/255.0, alpha: 1.0)
             textView = .white
             separator = UIColor(red: 60.0/255.0, green: 60.0/255.0, blue: 60.0/255.0, alpha: 1.0)
+            select = UIColor.white.withAlphaComponent(0.2)
         } else {
             tabBar = .white
             backgroundView = .white
@@ -77,13 +79,9 @@ class NCBrandColor: NSObject {
             backgroundForm = UIColor(red: 244.0/255.0, green: 244.0/255.0, blue: 244.0/255.0, alpha: 1.0)
             textView = .black
             separator = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
+            select = self.brand.withAlphaComponent(0.1)
         }
     }
-    
-    // Color modify
-    @objc public func getColorSelectBackgrond() -> UIColor {
-        return self.brand.withAlphaComponent(0.1)
-    }
 }
 
 @objc class NCBrandOptions: NSObject {

+ 4 - 4
iOSClient/Main/CCMain.m

@@ -2260,7 +2260,7 @@
     appDelegate.reMainMenu.textOffset = CGSizeMake(50, 0.0);
     appDelegate.reMainMenu.font = [UIFont systemFontOfSize:14.0];
     
-    appDelegate.reMainMenu.highlightedBackgroundColor =  NCBrandColor.sharedInstance.getColorSelectBackgrond;
+    appDelegate.reMainMenu.highlightedBackgroundColor =  NCBrandColor.sharedInstance.select;
     appDelegate.reMainMenu.highlightedSeparatorColor = nil;
     appDelegate.reMainMenu.highlightedTextColor = [UIColor blackColor];
     appDelegate.reMainMenu.highlightedTextShadowColor = nil;
@@ -2370,14 +2370,14 @@
     appDelegate.reSelectMenu.separatorHeight = 0.5;
     appDelegate.reSelectMenu.separatorColor = NCBrandColor.sharedInstance.separator;
     
-    appDelegate.reSelectMenu.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
-    appDelegate.reSelectMenu.textColor = [UIColor blackColor];
+    appDelegate.reSelectMenu.backgroundColor = NCBrandColor.sharedInstance.backgroundForm;
+    appDelegate.reSelectMenu.textColor = NCBrandColor.sharedInstance.textView;
     appDelegate.reSelectMenu.textAlignment = NSTextAlignmentLeft;
     appDelegate.reSelectMenu.textShadowColor = nil;
     appDelegate.reSelectMenu.textOffset = CGSizeMake(50, 0.0);
     appDelegate.reSelectMenu.font = [UIFont systemFontOfSize:14.0];
     
-    appDelegate.reSelectMenu.highlightedBackgroundColor = NCBrandColor.sharedInstance.getColorSelectBackgrond;
+    appDelegate.reSelectMenu.highlightedBackgroundColor = NCBrandColor.sharedInstance.select;
     appDelegate.reSelectMenu.highlightedSeparatorColor = nil;
     appDelegate.reSelectMenu.highlightedTextColor = [UIColor blackColor];
     appDelegate.reSelectMenu.highlightedTextShadowColor = nil;

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -344,7 +344,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
 
         // change color selection and disclosure indicator
         let selectionColor : UIView = UIView.init()
-        selectionColor.backgroundColor = NCBrandColor.sharedInstance.getColorSelectBackgrond()
+        selectionColor.backgroundColor = NCBrandColor.sharedInstance.select
         cell.selectedBackgroundView = selectionColor
         cell.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
         cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator

+ 1 - 1
iOSClient/Main/NCMainCommon.swift

@@ -537,7 +537,7 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
             
             // change color selection
             let selectionColor = UIView()
-            selectionColor.backgroundColor = NCBrandColor.sharedInstance.getColorSelectBackgrond()
+            selectionColor.backgroundColor = NCBrandColor.sharedInstance.select
             cell.selectedBackgroundView = selectionColor
             cell.tintColor = NCBrandColor.sharedInstance.brandElement
             

+ 1 - 1
iOSClient/Shares/NCShares.m

@@ -280,7 +280,7 @@
         
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
-    selectionColor.backgroundColor = NCBrandColor.sharedInstance.getColorSelectBackgrond;
+    selectionColor.backgroundColor = NCBrandColor.sharedInstance.select;
     cell.selectedBackgroundView = selectionColor;
     cell.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
     cell.labelTitle.textColor = NCBrandColor.sharedInstance.textView;