Browse Source

fix color NCSectionHeaderMenu

marinofaggiana 4 years ago
parent
commit
6c2a84ec96

+ 0 - 2
iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift

@@ -1277,8 +1277,6 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             }
             
             header.delegate = self
-            header.backgroundColor = NCBrandColor.sharedInstance.backgroundView
-            header.separator.backgroundColor = NCBrandColor.sharedInstance.separator
             header.setStatusButton(count: dataSource.metadatas.count)
             header.setTitleSorted(datasourceTitleButton: titleButton)
             header.viewRichWorkspaceHeightConstraint.constant = headerRichWorkspaceHeight

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

@@ -51,10 +51,7 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         buttonOrder.setTitleColor(NCBrandColor.sharedInstance.brandElement, for: .normal)
         
         buttonMore.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon), for: .normal)
-        
-        separator.backgroundColor = NCBrandColor.sharedInstance.separator
-        self.backgroundColor = NCBrandColor.sharedInstance.backgroundView
-        
+                
         // Gradient
         gradient.startPoint = CGPoint(x: 0, y: 0.60)
         gradient.endPoint = CGPoint(x: 0, y: 1)
@@ -75,6 +72,10 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
     }
     
     @objc func changeTheming() {
+        
+        backgroundColor = NCBrandColor.sharedInstance.backgroundView
+        separator.backgroundColor = NCBrandColor.sharedInstance.separator
+        
         if textViewColor != NCBrandColor.sharedInstance.textView {
             markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.sharedInstance.textView)
             markdownParser.header.font = UIFont.systemFont(ofSize: 25)