Ver Fonte

use default trash icon, if not available use 'Delete' string instead

cyberta há 4 anos atrás
pai
commit
6a3e1cac1d

+ 0 - 23
deltachat-ios/Assets.xcassets/ic_delete.imageset/Contents.json

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

BIN
deltachat-ios/Assets.xcassets/ic_delete.imageset/outline_delete_white_36pt_1x.png


BIN
deltachat-ios/Assets.xcassets/ic_delete.imageset/outline_delete_white_36pt_2x.png


BIN
deltachat-ios/Assets.xcassets/ic_delete.imageset/outline_delete_white_36pt_3x.png


+ 1 - 1
deltachat-ios/Chat/ChatViewController.swift

@@ -135,7 +135,7 @@ class ChatViewController: UITableViewController {
 
         let deleteItem = ContextMenuProvider.ContextMenuItem(
             title: String.localized("delete"),
-            imageName: "ic_delete",
+            imageName: "trash",
             isDestructive: true,
             action: #selector(BaseMessageCell.messageDelete),
             onPerform: { [weak self] indexPath in

+ 8 - 2
deltachat-ios/Chat/Views/ChatEditingBar.swift

@@ -38,8 +38,14 @@ public class ChatEditingBar: UIView, InputItem {
 
     private lazy var deleteButton: UIButton = {
         let view = UIButton()
-        view.tintColor = .red
-        view.setImage( #imageLiteral(resourceName: "ic_delete").withRenderingMode(.alwaysTemplate), for: .normal)
+
+        if #available(iOS 13.0, *) {
+            view.setImage(UIImage(systemName: "trash"), for: .normal)
+            view.tintColor = .systemBlue
+        } else {
+            view.setTitle("delete", for: .normal)
+            view.setTitleColor(.systemBlue, for: .normal)
+        }
         view.translatesAutoresizingMaskIntoConstraints = false
         view.isUserInteractionEnabled = true
         view.contentMode = .scaleAspectFit