Эх сурвалжийг харах

Fix share permission UI

- sectionFooter cancel button bg & border
- nav title spacing

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 жил өмнө
parent
commit
e7e37599fc

+ 4 - 0
iOSClient/Share/Advanced/NCShareAdvancePermissionFooter.swift

@@ -37,10 +37,14 @@ class NCShareAdvancePermissionFooter: UIView {
         self.delegate = delegate
         backgroundColor = .clear
 
+        buttonCancel.backgroundColor = .clear
         buttonCancel.addTarget(self, action: #selector(cancelClicked), for: .touchUpInside)
         buttonCancel.setTitle(NSLocalizedString("_cancel_", comment: ""), for: .normal)
+
         buttonCancel.layer.cornerRadius = 10
         buttonCancel.layer.masksToBounds = true
+        buttonCancel.layer.borderWidth = 2
+        buttonCancel.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
 
         buttonNext.setTitle(NSLocalizedString(delegate?.isNewShare == true ? "_share_" : "_save_", comment: ""), for: .normal)
         buttonNext.layer.cornerRadius = 10

+ 11 - 4
iOSClient/Share/Advanced/NCShareAdvancePermissionFooter.xib

@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -24,13 +25,14 @@
                 </button>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rCI-63-PtL">
                     <rect key="frame" x="383" y="128" width="351" height="50"/>
-                    <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="50" id="vdI-sH-cTb"/>
                     </constraints>
                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                     <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
-                    <state key="normal" title="Cancel"/>
+                    <state key="normal" title="Cancel">
+                        <color key="titleColor" systemColor="labelColor"/>
+                    </state>
                 </button>
             </subviews>
             <viewLayoutGuide key="safeArea" id="sWQ-1v-CIt"/>
@@ -52,4 +54,9 @@
             <point key="canvasLocation" x="169.56521739130437" y="197.54464285714286"/>
         </view>
     </objects>
+    <resources>
+        <systemColor name="labelColor">
+            <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

+ 1 - 1
iOSClient/Share/NCShare+Helper.swift

@@ -92,7 +92,7 @@ protocol NCShareDetail {
 
 extension NCShareDetail where Self: UIViewController {
     func setNavigationTitle() {
-        title = NSLocalizedString("_share_", comment: "") + "  – "
+        title = NSLocalizedString("_share_", comment: "") + " – "
         if share.shareType == NCShareCommon.shared.SHARE_TYPE_LINK {
             title! += share.label.isEmpty ? NSLocalizedString("_share_link_", comment: "") : share.label
         } else {