marinofaggiana 4 سال پیش
والد
کامیت
b173987b7f

+ 5 - 6
iOSClient/Main/Section Header Footer/NCSectionHeaderFooter.swift

@@ -58,6 +58,11 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         gradient.startPoint = CGPoint(x: 0, y: 0.60)
         gradient.endPoint = CGPoint(x: 0, y: 1)
         viewRichWorkspace.layer.addSublayer(gradient)
+        if traitCollection.userInterfaceStyle == .dark {
+            gradient.colors = [UIColor.init(white: 0, alpha: 0).cgColor, UIColor.black.cgColor]
+        } else {
+            gradient.colors = [UIColor.init(white: 1, alpha: 0).cgColor, UIColor.white.cgColor]
+        }
         
         let tap = UITapGestureRecognizer(target: self, action: #selector(touchUpInsideViewRichWorkspace(_:)))
         tap.delegate = self
@@ -72,8 +77,6 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
             textViewRichWorkspace.attributedText = markdownParser.parse(richWorkspaceText)
         }
         textViewColor = NCBrandColor.shared.label
-        
-        changeColor()
     }
     
     override func layoutSublayers(of layer: CALayer) {
@@ -84,10 +87,6 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        changeColor()
-    }
-    
-    func changeColor() {
         if traitCollection.userInterfaceStyle == .dark {
             gradient.colors = [UIColor.init(white: 0, alpha: 0).cgColor, UIColor.black.cgColor]
         } else {

+ 7 - 0
iOSClient/ScanDocument/ScanCollectionView.swift

@@ -97,6 +97,13 @@ class DragDropViewController: UIViewController {
         loadImage()
     }
     
+    override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
+        super.traitCollectionDidChange(previousTraitCollection)
+        
+        add.setImage(UIImage(named: "plus")?.image(color: NCBrandColor.shared.label, size: 25), for: .normal)
+        transferDown.setImage(UIImage(named: "transferDown")?.image(color: NCBrandColor.shared.label, size: 25), for: .normal)
+    }
+    
     //MARK: Button Action
 
     @IBAction func cancelAction(sender: UIBarButtonItem) {

+ 1 - 3
iOSClient/Select/NCSelect.swift

@@ -203,9 +203,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         super.traitCollectionDidChange(previousTraitCollection)
         
         if traitCollection.userInterfaceStyle == .dark {
-            
-        } else {
-            
+        } else {            
         }
     }