MessageViewController icon indicating copy to clipboard operation
MessageViewController copied to clipboard

Buttons don't align vertically with textInputView

Open siefix opened this issue 5 years ago • 1 comments

Using latest master branch

The button(s) of the messageView have their own arbitrary vertical alignment. Is there any way to make them match the messageView.textViewInset you set?

Looks like you can only set the right/left insets of buttons using messageView.setButton(inset: CGFloat, position: MessageView.ButtonPosition)

Could it be laying out on its own margins because of sizeToFit()?

internal func buttonLayoutDidChange(button: UIButton) {
        button.sizeToFit()
        setNeedsLayout()
}

img_5416

img_5413

siefix avatar Sep 13 '18 21:09 siefix

Ya could be the buttons own insets causing the problem? We tweaked the button layout a little in the latest version. I’m open to reviewing some PRs to adjust it!

Sent with GitHawk

rnystrom avatar Sep 14 '18 10:09 rnystrom