marinofaggiana 4 anos atrás
pai
commit
f939e5ff37

+ 7 - 3
iOSClient/Main/Colleaction Common/NCCollectionCommon.swift

@@ -93,13 +93,17 @@ class NCCollectionCommon: NSObject, NCSelectDelegate {
         images.buttonStop = UIImage(named: "stop")!.image(color: NCBrandColor.shared.graySoft, size: 50)
     }
     
-    @objc func loadImage(named: String, color: UIColor = NCBrandColor.shared.icon, size: CGFloat = 50) -> UIImage {
+    @objc func loadImage(named: String, color: UIColor = NCBrandColor.shared.icon, size: CGFloat = 50, forcedResizeSF: Bool = false) -> UIImage {
         
         var image: UIImage?
         
         if #available(iOS 13.0, *) {
-            let configuration = UIImage.SymbolConfiguration(pointSize: size)
-            image = UIImage(systemName: named, withConfiguration: configuration)?.imageColor(color)
+            if forcedResizeSF {
+                let configuration = UIImage.SymbolConfiguration(pointSize: size)
+                image = UIImage(systemName: named, withConfiguration: configuration)?.imageColor(color)
+            } else {
+                image = UIImage(systemName: named)?.imageColor(color)
+            }
             if image == nil {
                 image = UIImage(named: named)?.image(color: color, size: size)
             }

+ 1 - 1
iOSClient/Settings/CCAdvanced.m

@@ -225,7 +225,7 @@
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
     [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"trash" color:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
+    [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"trash" color:NCBrandColor.shared.icon size:25 forcedResizeSF:false] forKey:@"imageView.image"];
     row.action.formSelector = @selector(clearCacheRequest:);
     [section addFormRow:row];
 

+ 3 - 3
iOSClient/Settings/CCManageAccount.m

@@ -72,7 +72,7 @@
             
         } else {
             
-            avatar = [[NCCollectionCommon shared] loadImageWithNamed:@"avatar" color:NCBrandColor.shared.icon size:35];
+            avatar = [[NCCollectionCommon shared] loadImageWithNamed:@"avatar" color:NCBrandColor.shared.icon size:35 forcedResizeSF:false];
         }
         
         row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
@@ -127,7 +127,7 @@
         row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
         [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"trash" color:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
+        [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"trash" color:NCBrandColor.shared.icon size:25 forcedResizeSF:false] forKey:@"imageView.image"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
         row.action.formSelector = @selector(deleteAccount:);
         if (accounts.count == 0) row.disabled = @YES;
@@ -240,7 +240,7 @@
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
         [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
-        [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"network" color:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
+        [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"network" color:NCBrandColor.shared.icon size:25 forcedResizeSF:false] forKey:@"imageView.image"];
         row.value = accountActive.webpage;
         [section addFormRow:row];
     }

+ 1 - 1
iOSClient/Settings/NCSettings.m

@@ -149,7 +149,7 @@
     row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
     [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
-    [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"gear" color:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
+    [row.cellConfig setObject:[[NCCollectionCommon shared] loadImageWithNamed:@"gear" color:NCBrandColor.shared.icon size:25 forcedResizeSF:false] forKey:@"imageView.image"];
     row.action.viewControllerClass = [CCAdvanced class];
     [section addFormRow:row];