Browse Source

theming sharing view

Marino Faggiana 7 years ago
parent
commit
4a06c6b59d

+ 12 - 13
iOSClient/Share/CCShare.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -23,12 +23,11 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="ejc-ux-EAE">
-                                <rect key="frame" x="0.0" y="86" width="375" height="581"/>
+                                <rect key="frame" x="0.0" y="78" width="375" height="589"/>
                                 <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </tableView>
                             <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="g7r-0n-C6A" userLabel="File Image View">
                                 <rect key="frame" x="16" y="28" width="50" height="50"/>
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="50" id="aFd-Ss-ph2"/>
                                     <constraint firstAttribute="height" constant="50" id="fWJ-Sq-Yb3"/>
@@ -62,7 +61,7 @@
                             <constraint firstAttribute="trailing" secondItem="ejc-ux-EAE" secondAttribute="trailing" id="Qmg-GS-aNl"/>
                             <constraint firstAttribute="trailingMargin" secondItem="5R0-1B-nUL" secondAttribute="trailing" constant="53" id="Wf2-P9-9R0"/>
                             <constraint firstItem="0rc-qU-t2v" firstAttribute="top" secondItem="ypH-iM-3do" secondAttribute="bottom" constant="9" id="ZUu-Ur-vra"/>
-                            <constraint firstItem="ejc-ux-EAE" firstAttribute="top" secondItem="ypH-iM-3do" secondAttribute="bottom" constant="66" id="e5l-5V-Ic6"/>
+                            <constraint firstItem="ejc-ux-EAE" firstAttribute="top" secondItem="ypH-iM-3do" secondAttribute="bottom" constant="58" id="e5l-5V-Ic6"/>
                             <constraint firstItem="g3i-ij-OJy" firstAttribute="top" secondItem="ejc-ux-EAE" secondAttribute="bottom" id="g0g-ki-s02"/>
                             <constraint firstAttribute="leadingMargin" secondItem="g7r-0n-C6A" secondAttribute="leading" id="pUq-DL-LqB"/>
                         </constraints>
@@ -91,7 +90,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="Gm7-74-eSh">
-                                <rect key="frame" x="0.0" y="60" width="375" height="607"/>
+                                <rect key="frame" x="0.0" y="45" width="375" height="622"/>
                                 <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </tableView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tz1-hm-QBT">
@@ -105,7 +104,7 @@
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstItem="Gm7-74-eSh" firstAttribute="top" secondItem="ZiR-UH-h8a" secondAttribute="bottom" constant="40" id="9fi-43-f40"/>
+                            <constraint firstItem="Gm7-74-eSh" firstAttribute="top" secondItem="ZiR-UH-h8a" secondAttribute="bottom" constant="25" id="9fi-43-f40"/>
                             <constraint firstItem="Gm7-74-eSh" firstAttribute="leading" secondItem="Jiu-JY-UWo" secondAttribute="leading" id="GP9-0g-84R"/>
                             <constraint firstItem="tz1-hm-QBT" firstAttribute="top" secondItem="ZiR-UH-h8a" secondAttribute="bottom" id="aGS-9O-wzn"/>
                             <constraint firstItem="Iv5-it-wkO" firstAttribute="top" secondItem="Gm7-74-eSh" secondAttribute="bottom" id="fhG-d5-kpd"/>
@@ -135,7 +134,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="DRw-C6-XHf">
-                                <rect key="frame" x="0.0" y="60" width="375" height="607"/>
+                                <rect key="frame" x="0.0" y="44" width="375" height="623"/>
                                 <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </tableView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UkB-6i-4rS">
@@ -149,7 +148,7 @@
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstItem="DRw-C6-XHf" firstAttribute="top" secondItem="eqs-fE-Yye" secondAttribute="bottom" constant="40" id="02t-PL-QWM"/>
+                            <constraint firstItem="DRw-C6-XHf" firstAttribute="top" secondItem="eqs-fE-Yye" secondAttribute="bottom" constant="24" id="02t-PL-QWM"/>
                             <constraint firstAttribute="trailing" secondItem="DRw-C6-XHf" secondAttribute="trailing" id="Akh-kD-zen"/>
                             <constraint firstAttribute="trailingMargin" secondItem="UkB-6i-4rS" secondAttribute="trailing" constant="-8" id="ZYs-Fv-ghX"/>
                             <constraint firstItem="DRw-C6-XHf" firstAttribute="leading" secondItem="vkr-eQ-OYs" secondAttribute="leading" id="dPK-kZ-gF6"/>
@@ -164,7 +163,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="a31-QY-djo" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="1950" y="614"/>
+            <point key="canvasLocation" x="1949.5999999999999" y="613.94302848575717"/>
         </scene>
         <!--CCShareInfoCMOC ownCloud-->
         <scene sceneID="9He-gi-9NT">
@@ -179,7 +178,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="0Tl-U6-oZH">
-                                <rect key="frame" x="0.0" y="60" width="375" height="607"/>
+                                <rect key="frame" x="0.0" y="45" width="375" height="622"/>
                                 <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </tableView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="z1J-6F-519">
@@ -195,7 +194,7 @@
                         <constraints>
                             <constraint firstAttribute="trailingMargin" secondItem="z1J-6F-519" secondAttribute="trailing" constant="-8" id="470-o5-hbr"/>
                             <constraint firstItem="z1J-6F-519" firstAttribute="top" secondItem="cJu-FE-egs" secondAttribute="bottom" id="4ax-aH-ys3"/>
-                            <constraint firstItem="0Tl-U6-oZH" firstAttribute="top" secondItem="cJu-FE-egs" secondAttribute="bottom" constant="40" id="7hl-hq-nP4"/>
+                            <constraint firstItem="0Tl-U6-oZH" firstAttribute="top" secondItem="cJu-FE-egs" secondAttribute="bottom" constant="25" id="7hl-hq-nP4"/>
                             <constraint firstItem="0Tl-U6-oZH" firstAttribute="leading" secondItem="ThM-gV-z79" secondAttribute="leading" id="E6g-O0-jvY"/>
                             <constraint firstItem="LKN-3A-aUQ" firstAttribute="top" secondItem="0Tl-U6-oZH" secondAttribute="bottom" id="PTW-nP-5Cr"/>
                             <constraint firstAttribute="trailing" secondItem="0Tl-U6-oZH" secondAttribute="trailing" id="kTy-Ip-ZUU"/>
@@ -208,7 +207,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="NFe-CI-5yc" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="2593" y="614"/>
+            <point key="canvasLocation" x="2592.8000000000002" y="613.94302848575717"/>
         </scene>
     </scenes>
 </document>

+ 2 - 3
iOSClient/Share/CCShareInfoCMOC.m

@@ -151,11 +151,10 @@
 {
     [super viewDidLoad];
     
-    [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
-    self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.endButton.tintColor = [NCBrandColor sharedInstance].brand;
     
     self.tableView.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
 }

+ 15 - 7
iOSClient/Share/CCShareOC.m

@@ -57,7 +57,6 @@
     form = [XLFormDescriptor formDescriptor];
     form.rowNavigationOptions = XLFormRowNavigationOptionNone;
     
-    
     // Share Link
     
     section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_share_link_", nil)];
@@ -119,19 +118,28 @@
 {
     [super viewDidLoad];
     
-    [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
-    self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.endButton.tintColor = [NCBrandColor sharedInstance].brand;
     
     [self reloadData];
     
-    if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, self.metadata.fileID]]) self.fileImageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, self.metadata.fileID]];
-    else self.fileImageView.image = [UIImage imageNamed:self.metadata.iconName];
+    if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, self.metadata.fileID]]) {
+        
+        self.fileImageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, self.metadata.fileID]];
+        
+    } else {
+        
+        if (self.metadata.directory)
+            self.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:self.metadata.iconName] color:[NCBrandColor sharedInstance].brand];
+        else
+            self.fileImageView.image = [UIImage imageNamed:self.metadata.iconName];
+
+    }
     
     self.labelTitle.text = self.metadata.fileNamePrint;
-    self.labelTitle.textColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.labelTitle.textColor = [UIColor blackColor];
     
     self.tableView.tableHeaderView = ({UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 0.1 / UIScreen.mainScreen.scale)];
         line.backgroundColor = self.tableView.separatorColor;

+ 2 - 3
iOSClient/Share/CCSharePermissionOC.m

@@ -151,11 +151,10 @@
 {
     [super viewDidLoad];
     
-    [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
-    self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.endButton.tintColor = [NCBrandColor sharedInstance].brand;
     
     self.tableView.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
     

+ 2 - 3
iOSClient/Share/CCShareUserOC.m

@@ -101,11 +101,10 @@
     
     self.selectedItems = [[NSMutableArray alloc] init];
     
-    [self.view setTintColor:[NCBrandColor sharedInstance].brand];
-    self.view.backgroundColor = [NCBrandColor sharedInstance].brand;
+    self.view.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
     
     [self.endButton setTitle:NSLocalizedString(@"_done_", nil) forState:UIControlStateNormal];
-    self.endButton.tintColor = [NCBrandColor sharedInstance].navigationBarText;
+    self.endButton.tintColor = [NCBrandColor sharedInstance].brand;
     
     self.tableView.backgroundColor = [NCBrandColor sharedInstance].tableBackground;
 }