瀏覽代碼

make message input bar translucent

cyberta 3 年之前
父節點
當前提交
98335d837e
共有 2 個文件被更改,包括 3 次插入5 次删除
  1. 0 2
      deltachat-ios/Chat/ChatViewController.swift
  2. 3 3
      deltachat-ios/Chat/Views/ChatInputBar.swift

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

@@ -1069,8 +1069,6 @@ class ChatViewController: UITableViewController {
         messageInputBar.separatorLine.backgroundColor = DcColors.colorDisabled
         messageInputBar.separatorLine.backgroundColor = DcColors.colorDisabled
         messageInputBar.inputTextView.tintColor = DcColors.primary
         messageInputBar.inputTextView.tintColor = DcColors.primary
         messageInputBar.inputTextView.textColor = DcColors.defaultTextColor
         messageInputBar.inputTextView.textColor = DcColors.defaultTextColor
-        messageInputBar.backgroundView.backgroundColor = DcColors.chatBackgroundColor
-        messageInputBar.backgroundColor = DcColors.chatBackgroundColor
         messageInputBar.inputTextView.backgroundColor = DcColors.inputFieldColor
         messageInputBar.inputTextView.backgroundColor = DcColors.inputFieldColor
         messageInputBar.inputTextView.placeholderTextColor = DcColors.placeholderColor
         messageInputBar.inputTextView.placeholderTextColor = DcColors.placeholderColor
         messageInputBar.inputTextView.textContainerInset = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 38)
         messageInputBar.inputTextView.textContainerInset = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 38)

+ 3 - 3
deltachat-ios/Chat/Views/ChatInputBar.swift

@@ -18,7 +18,6 @@ public class ChatInputBar: InputBarAccessoryView {
         button.isHidden = true
         button.isHidden = true
         return button
         return button
     }()
     }()
-    
 
 
     public convenience init() {
     public convenience init() {
         self.init(frame: .zero)
         self.init(frame: .zero)
@@ -27,19 +26,20 @@ public class ChatInputBar: InputBarAccessoryView {
     public override init(frame: CGRect) {
     public override init(frame: CGRect) {
         super.init(frame: frame)
         super.init(frame: frame)
         setupKeyboardObserver()
         setupKeyboardObserver()
-        backgroundView.backgroundColor = DcColors.defaultBackgroundColor
     }
     }
 
 
     required public init?(coder aDecoder: NSCoder) {
     required public init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         super.init(coder: aDecoder)
         setupKeyboardObserver()
         setupKeyboardObserver()
-        backgroundView.backgroundColor = DcColors.defaultBackgroundColor
     }
     }
 
 
     override open func setup() {
     override open func setup() {
         replaceInputBar()
         replaceInputBar()
         setupScrollDownButton()
         setupScrollDownButton()
         super.setup()
         super.setup()
+        backgroundColor = .clear
+        backgroundView.backgroundColor = DcColors.defaultBackgroundColor
+        isTranslucent = true
     }
     }
     
     
     @objc func onScrollDownPressed() {
     @objc func onScrollDownPressed() {