Marino Faggiana 1 жил өмнө
parent
commit
6479627712

+ 19 - 0
iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.swift

@@ -30,6 +30,7 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
     @IBOutlet weak var buttonOrder: UIButton!
     @IBOutlet weak var buttonMore: UIButton!
     @IBOutlet weak var buttonTransfer: UIButton!
+    @IBOutlet weak var imageButtonTransfer: UIImageView!
     @IBOutlet weak var labelTransfer: UILabel!
     @IBOutlet weak var progressTransfer: UIProgressView!
     @IBOutlet weak var transferSeparatorTop: UIView!
@@ -93,6 +94,8 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         buttonTransfer.setImage(nil, for: .normal)
         buttonTransfer.layer.cornerRadius = 6
         buttonTransfer.layer.masksToBounds = true
+        imageButtonTransfer.image = UIImage(systemName: "stop.circle")
+        imageButtonTransfer.tintColor = .white
         labelTransfer.text = ""
         progressTransfer.tintColor = NCBrandColor.shared.brand
         progressTransfer.trackTintColor = .clear
@@ -100,6 +103,8 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         transferSeparatorBottom.backgroundColor = .separator
         transferSeparatorTopHeightConstraint.constant = 0.5
         transferSeparatorBottomHeightConstraint.constant = 0.5
+
+        //buttonTransfer.addoverlay(color: .black, alpha: 0.1)
     }
 
     override func layoutSublayers(of layer: CALayer) {
@@ -380,3 +385,17 @@ protocol NCSectionFooterDelegate: AnyObject {
 extension NCSectionFooterDelegate {
     func tapButtonSection(_ sender: Any, metadataForSection: NCMetadataForSection?) {}
 }
+
+extension UIButton {
+    func addoverlay(color: UIColor = .black, alpha: CGFloat = 0.6) {
+        let overlay = UIView()
+        overlay.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+        overlay.frame = bounds
+        overlay.backgroundColor = color
+        overlay.alpha = alpha
+        overlay.isUserInteractionEnabled = true
+        overlay.layer.cornerRadius = 6
+        overlay.layer.masksToBounds = true
+        addSubview(overlay)
+    }
+}

+ 1 - 0
iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.xib

@@ -194,6 +194,7 @@
                 <outlet property="buttonOrder" destination="0bo-yl-t5k" id="Kbw-BG-73C"/>
                 <outlet property="buttonSwitch" destination="1LD-cd-zhc" id="Ec2-cM-CoY"/>
                 <outlet property="buttonTransfer" destination="aS9-DV-CXI" id="Qsu-aQ-Vh7"/>
+                <outlet property="imageButtonTransfer" destination="Pgk-le-540" id="ljU-AW-YSt"/>
                 <outlet property="labelSection" destination="mB5-5n-AL9" id="uxf-bN-nZA"/>
                 <outlet property="labelTransfer" destination="eER-Zj-8iK" id="ARz-bB-Hg9"/>
                 <outlet property="progressTransfer" destination="FOe-YO-km8" id="vyd-rg-H9B"/>