Преглед изворни кода

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana пре 2 година
родитељ
комит
bca1694337

+ 2 - 2
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -1863,7 +1863,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
 
                 header.setSectionHeight(heightHeaderSection)
                 header.labelSection.text = self.dataSource.getSectionValue(indexPath: indexPath).firstUppercased
-                header.labelSection.textColor = NCBrandColor.shared.brandElement
+                header.labelSection.textColor = NCBrandColor.shared.label
 
                 return header
 
@@ -1872,7 +1872,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "sectionHeader", for: indexPath) as! NCSectionHeader
 
                 header.labelSection.text = self.dataSource.getSectionValue(indexPath: indexPath).firstUppercased
-                header.labelSection.textColor = NCBrandColor.shared.brandElement
+                header.labelSection.textColor = NCBrandColor.shared.label
 
                 return header
             }

+ 14 - 1
iOSClient/Main/Section Header Footer/NCSectionHeader.xib

@@ -16,19 +16,32 @@
             <subviews>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gzy-cT-Gjn">
                     <rect key="frame" x="10" y="16" width="355" height="18"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
                     <nil key="textColor"/>
                     <nil key="highlightedColor"/>
                 </label>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B46-BA-IKR" userLabel="separator">
+                    <rect key="frame" x="50" y="49" width="325" height="1"/>
+                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="1" id="Tef-Rk-FCb"/>
+                    </constraints>
+                </view>
             </subviews>
             <viewLayoutGuide key="safeArea" id="EFn-SN-cxu"/>
             <constraints>
+                <constraint firstItem="EFn-SN-cxu" firstAttribute="bottom" secondItem="B46-BA-IKR" secondAttribute="bottom" id="EkR-MJ-zaA"/>
+                <constraint firstItem="EFn-SN-cxu" firstAttribute="leading" secondItem="B46-BA-IKR" secondAttribute="leading" constant="-50" id="PBx-z1-ALr"/>
                 <constraint firstAttribute="trailing" secondItem="gzy-cT-Gjn" secondAttribute="trailing" constant="10" id="QzY-ac-CRO"/>
                 <constraint firstItem="gzy-cT-Gjn" firstAttribute="centerY" secondItem="Vin-9E-7nW" secondAttribute="centerY" id="avP-sX-JB5"/>
+                <constraint firstItem="B46-BA-IKR" firstAttribute="trailing" secondItem="EFn-SN-cxu" secondAttribute="trailing" id="dsu-fv-NmK"/>
                 <constraint firstItem="gzy-cT-Gjn" firstAttribute="leading" secondItem="Vin-9E-7nW" secondAttribute="leading" constant="10" id="hZz-MT-pHg"/>
             </constraints>
             <connections>
                 <outlet property="labelSection" destination="gzy-cT-Gjn" id="gfz-ks-qSP"/>
+                <outlet property="separator" destination="B46-BA-IKR" id="ZeR-MO-lBU"/>
+                <outlet property="separatorHeightConstraint" destination="Tef-Rk-FCb" id="Png-Ox-9YB"/>
             </connections>
             <point key="canvasLocation" x="138" y="154"/>
         </collectionReusableView>

+ 9 - 0
iOSClient/Main/Section Header Footer/NCSectionHeaderFooter.swift

@@ -48,6 +48,8 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
 
     @IBOutlet weak var textViewRichWorkspace: UITextView!
     @IBOutlet weak var labelSection: UILabel!
+    @IBOutlet weak var separatorSection: UIView!
+    @IBOutlet weak var separatorSectionHeightConstraint: NSLayoutConstraint!
 
     weak var delegate: NCSectionHeaderMenuDelegate?
 
@@ -112,6 +114,8 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
 
         labelSection.text = ""
         viewSectionHeightConstraint.constant = 0
+        separatorSection.backgroundColor = NCBrandColor.shared.separator
+        separatorSectionHeightConstraint.constant = 0.5
     }
 
     override func layoutSublayers(of layer: CALayer) {
@@ -294,12 +298,17 @@ extension NCSectionHeaderMenuDelegate {
 class NCSectionHeader: UICollectionReusableView {
 
     @IBOutlet weak var labelSection: UILabel!
+    @IBOutlet weak var separator: UIView!
+    @IBOutlet weak var separatorHeightConstraint: NSLayoutConstraint!
 
     override func awakeFromNib() {
         super.awakeFromNib()
 
         self.backgroundColor = UIColor.clear
         self.labelSection.text = ""
+
+        separator.backgroundColor = NCBrandColor.shared.separator
+        separatorHeightConstraint.constant = 0.5
     }
 }
 

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

@@ -146,15 +146,26 @@
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mB5-5n-AL9">
                             <rect key="frame" x="10" y="16" width="531" height="18"/>
-                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
                             <nil key="textColor"/>
                             <nil key="highlightedColor"/>
                         </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="quO-U8-m9B">
+                            <rect key="frame" x="50" y="50" width="501" height="1"/>
+                            <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="dSE-nA-ELX"/>
+                            </constraints>
+                        </view>
                     </subviews>
                     <constraints>
                         <constraint firstAttribute="trailing" secondItem="mB5-5n-AL9" secondAttribute="trailing" constant="10" id="Cct-8N-ghQ"/>
+                        <constraint firstAttribute="trailing" secondItem="quO-U8-m9B" secondAttribute="trailing" id="L8y-G9-wWa"/>
                         <constraint firstItem="mB5-5n-AL9" firstAttribute="centerY" secondItem="f9U-NY-4OS" secondAttribute="centerY" id="Uom-oG-Fd7"/>
+                        <constraint firstItem="quO-U8-m9B" firstAttribute="top" secondItem="f9U-NY-4OS" secondAttribute="bottom" id="Y2Z-4C-qQt"/>
                         <constraint firstAttribute="height" constant="50" id="ZcL-Wd-xhN"/>
+                        <constraint firstItem="quO-U8-m9B" firstAttribute="leading" secondItem="f9U-NY-4OS" secondAttribute="leading" constant="50" id="jd8-j4-wwL"/>
                         <constraint firstItem="mB5-5n-AL9" firstAttribute="leading" secondItem="f9U-NY-4OS" secondAttribute="leading" constant="10" id="xQp-zk-G00"/>
                     </constraints>
                 </view>
@@ -185,6 +196,8 @@
                 <outlet property="buttonOrder" destination="0bo-yl-t5k" id="Kbw-BG-73C"/>
                 <outlet property="buttonSwitch" destination="1LD-cd-zhc" id="Ec2-cM-CoY"/>
                 <outlet property="labelSection" destination="mB5-5n-AL9" id="uxf-bN-nZA"/>
+                <outlet property="separatorSection" destination="quO-U8-m9B" id="xoD-zk-vFV"/>
+                <outlet property="separatorSectionHeightConstraint" destination="dSE-nA-ELX" id="TRp-JD-C7F"/>
                 <outlet property="textViewRichWorkspace" destination="pYo-pF-MGv" id="2h4-LP-T1z"/>
                 <outlet property="viewButtonsCommand" destination="4m9-yf-RbB" id="d1a-Pc-ujo"/>
                 <outlet property="viewButtonsCommandHeightConstraint" destination="aJx-Rv-Dc0" id="58a-bd-5ri"/>