Pārlūkot izejas kodu

increase available width of editing bar

cyberta 4 gadi atpakaļ
vecāks
revīzija
b14164ba46
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  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)
     }