Fix first line of emotes in emote picker window being shifted.

This commit is contained in:
Cranken 2019-10-02 12:05:46 +02:00 committed by fourtf
parent de4bfad46c
commit f89ca517ce

View file

@ -137,7 +137,9 @@ void MessageLayoutContainer::breakLine()
if (this->flags_.has(MessageFlag::Centered) && this->elements_.size() > 0) if (this->flags_.has(MessageFlag::Centered) && this->elements_.size() > 0)
{ {
xOffset = (width_ - this->elements_.at(0)->getRect().left() - const int marginOffset = int(this->margin.left * this->scale_) +
int(this->margin.right * this->scale_);
xOffset = (width_ - marginOffset -
this->elements_.at(this->elements_.size() - 1) this->elements_.at(this->elements_.size() - 1)
->getRect() ->getRect()
.right()) / .right()) /