Browse Source

improvements UI

Marino Faggiana 6 years ago
parent
commit
068b73250f

+ 1 - 1
iOSClient/Activity/CCActivity.m

@@ -129,7 +129,7 @@
 
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
 {
-    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"activityNoRecord"] multiplier:2 color:[NCBrandColor sharedInstance].graySoft];
+    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"activityNoRecord"] multiplier:1 color:[NCBrandColor sharedInstance].graySoft];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView

BIN
iOSClient/Images.xcassets/activity.imageset/activity.png


BIN
iOSClient/Images.xcassets/activity.imageset/activity@2x.png


BIN
iOSClient/Images.xcassets/activity.imageset/activity@3x.png


BIN
iOSClient/Images.xcassets/activityNoRecord.imageset/activityNoRecord@2x.png


BIN
iOSClient/Images.xcassets/more.imageset/more.png


BIN
iOSClient/Images.xcassets/more.imageset/more@2x.png


BIN
iOSClient/Images.xcassets/more.imageset/more@3x.png


+ 3 - 1
iOSClient/Images.xcassets/trashMore.imageset/Contents.json → iOSClient/Images.xcassets/restore.imageset/Contents.json

@@ -2,15 +2,17 @@
   "images" : [
     {
       "idiom" : "universal",
+      "filename" : "restore.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "trashMore@2x.png",
+      "filename" : "restore@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
+      "filename" : "restore@3x.png",
       "scale" : "3x"
     }
   ],

BIN
iOSClient/Images.xcassets/restore.imageset/restore.png


BIN
iOSClient/Images.xcassets/restore.imageset/restore@2x.png


BIN
iOSClient/Images.xcassets/restore.imageset/restore@3x.png


BIN
iOSClient/Images.xcassets/trashMore.imageset/trashMore@2x.png


+ 0 - 21
iOSClient/Images.xcassets/trashRestore.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "trashRestore@2.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/trashRestore.imageset/trashRestore@2.png


+ 1 - 1
iOSClient/Trash/NCTrash.swift

@@ -249,7 +249,7 @@ class GridLayout: UICollectionViewFlowLayout {
         get {
             if let collectionView = collectionView {
                 let itemWidth: CGFloat = (collectionView.frame.width/CGFloat(self.numberOfColumns)) - self.minimumInteritemSpacing
-                let itemHeight: CGFloat = itemWidth + 40
+                let itemHeight: CGFloat = itemWidth + 34
                 return CGSize(width: itemWidth, height: itemHeight)
             }
             

+ 2 - 2
iOSClient/Trash/NCTrashGridCell.swift

@@ -26,8 +26,8 @@ class NCTrashGridCell: UICollectionViewCell {
     override func awakeFromNib() {
         super.awakeFromNib()
        
-        restore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashRestore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
-        more.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashMore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+        restore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "restore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+        more.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
                 
         let tapGestureRestore = UITapGestureRecognizer(target: self, action: #selector(NCTrashGridCell.tapRestore(sender:)))
         addGestureRecognizer(tapGestureRestore)

+ 9 - 9
iOSClient/Trash/NCTrashGridCell.xib

@@ -20,26 +20,26 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5Ci-V1-hf5" userLabel="ImageItem">
-                        <rect key="frame" x="0.0" y="0.0" width="220" height="268"/>
+                        <rect key="frame" x="0.0" y="0.0" width="220" height="274"/>
                     </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eU3-lY-fKr" userLabel="Label Title">
-                        <rect key="frame" x="0.0" y="268" width="220" height="14.5"/>
+                        <rect key="frame" x="0.0" y="274" width="220" height="14.5"/>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <nil key="textColor"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3sA-NC-kIg" userLabel="More">
-                        <rect key="frame" x="194" y="282.5" width="26" height="26"/>
+                        <rect key="frame" x="200" y="288.5" width="20" height="20"/>
                         <constraints>
-                            <constraint firstAttribute="width" constant="26" id="hoH-4o-Tff"/>
-                            <constraint firstAttribute="height" constant="26" id="vGK-h7-x3M"/>
+                            <constraint firstAttribute="width" constant="20" id="hoH-4o-Tff"/>
+                            <constraint firstAttribute="height" constant="20" id="vGK-h7-x3M"/>
                         </constraints>
                     </imageView>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="b2F-OH-tLj" userLabel="restore">
-                        <rect key="frame" x="0.0" y="282.5" width="26" height="26"/>
+                        <rect key="frame" x="0.0" y="288.5" width="20" height="20"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="26" id="L0E-5H-HIf"/>
-                            <constraint firstAttribute="width" constant="26" id="Qmu-32-cdJ"/>
+                            <constraint firstAttribute="height" constant="20" id="L0E-5H-HIf"/>
+                            <constraint firstAttribute="width" constant="20" id="Qmu-32-cdJ"/>
                         </constraints>
                     </imageView>
                 </subviews>
@@ -51,7 +51,7 @@
                 <constraint firstItem="5Ci-V1-hf5" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" id="Ouj-ZD-UFm"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="5Ci-V1-hf5" secondAttribute="trailing" id="cHT-cP-NN6"/>
                 <constraint firstItem="3sA-NC-kIg" firstAttribute="top" secondItem="eU3-lY-fKr" secondAttribute="bottom" id="eAl-yv-CrK"/>
-                <constraint firstItem="VXh-sQ-LeX" firstAttribute="bottom" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="40" id="eEC-eB-alE"/>
+                <constraint firstItem="VXh-sQ-LeX" firstAttribute="bottom" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="34" id="eEC-eB-alE"/>
                 <constraint firstItem="eU3-lY-fKr" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="gZe-FC-8XQ"/>
                 <constraint firstItem="b2F-OH-tLj" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="i72-LQ-zRc"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="3sA-NC-kIg" secondAttribute="trailing" id="olr-QB-oyb"/>

+ 3 - 2
iOSClient/Trash/NCTrashHeader.swift

@@ -19,8 +19,9 @@ class NCTrashHeader: UICollectionReusableView {
     override func awakeFromNib() {
         super.awakeFromNib()
         
-        tapMore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashMore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
-        
+        tapMore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+        tapSwitch.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+
         separator.backgroundColor = NCBrandColor.sharedInstance.seperator
         
         let tapGestureSwitch = UITapGestureRecognizer(target: self, action: #selector(NCTrashHeader.tapSwitch(sender:)))

+ 2 - 2
iOSClient/Trash/NCTrashListCell.swift

@@ -31,8 +31,8 @@ class NCTrashListCell: UICollectionViewCell {
     override func awakeFromNib() {
         super.awakeFromNib()
        
-        restore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashRestore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
-        more.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashMore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+        restore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "restore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+        more.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
         
         separator.backgroundColor = NCBrandColor.sharedInstance.seperator
         

+ 6 - 6
iOSClient/Trash/NCTrashListCell.xib

@@ -46,17 +46,17 @@
                         </constraints>
                     </imageView>
                     <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dgL-g5-Nkc" userLabel="More">
-                        <rect key="frame" x="557" y="17" width="26" height="26"/>
+                        <rect key="frame" x="560" y="20" width="20" height="20"/>
                         <constraints>
-                            <constraint firstAttribute="width" constant="26" id="05P-NL-pd8"/>
-                            <constraint firstAttribute="height" constant="26" id="Jet-eo-x1M"/>
+                            <constraint firstAttribute="width" constant="20" id="05P-NL-pd8"/>
+                            <constraint firstAttribute="height" constant="20" id="Jet-eo-x1M" userLabel="height = 20"/>
                         </constraints>
                     </imageView>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nwZ-pi-Igj" userLabel="restore">
-                        <rect key="frame" x="497" y="17" width="26" height="26"/>
+                        <rect key="frame" x="500" y="20" width="20" height="20"/>
                         <constraints>
-                            <constraint firstAttribute="width" constant="26" id="5Zc-h7-ZRJ"/>
-                            <constraint firstAttribute="height" constant="26" id="xvo-pN-hfE"/>
+                            <constraint firstAttribute="width" constant="20" id="5Zc-h7-ZRJ"/>
+                            <constraint firstAttribute="height" constant="20" id="xvo-pN-hfE"/>
                         </constraints>
                     </imageView>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Egg-cb-EhZ" userLabel="Separator">