Sfoglia il codice sorgente

increase available width of editing bar

cyberta 4 anni fa
parent
commit
b14164ba46
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      deltachat-ios/Chat/ChatViewController.swift

+ 6 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -506,8 +506,14 @@ class ChatViewController: UITableViewController {
         draftArea.configure(draft: draft)
         if draft.isEditing {
             messageInputBar.setMiddleContentView(editingBar, animated: false)
+            messageInputBar.setLeftStackViewWidthConstant(to: 0, animated: false)
+            messageInputBar.setRightStackViewWidthConstant(to: 0, animated: false)
+            messageInputBar.padding = UIEdgeInsets(top: 6, left: 0, bottom: 6, right: 0)
         } else {
             messageInputBar.setMiddleContentView(messageInputBar.inputTextView, animated: false)
+            messageInputBar.setLeftStackViewWidthConstant(to: 40, animated: false)
+            messageInputBar.setRightStackViewWidthConstant(to: 40, animated: false)
+            messageInputBar.padding = UIEdgeInsets(top: 6, left: 6, bottom: 6, right: 12)
         }
         messageInputBar.setStackViewItems([draftArea], forStack: .top, animated: true)
     }