Move reply bar to the top of the sticker.

That way a fast share button in channels isn't overlapping with it.
This commit is contained in:
John Preston 2017-07-15 15:05:46 +03:00
parent a935075782
commit 397e1dde78

View File

@ -2710,12 +2710,9 @@ void HistorySticker::draw(Painter &p, const QRect &r, TextSelection selection, T
recth += st::msgReplyBarSize.height();
}
int rectx = isPost ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left()));
int recty = _height - recth;
int recty = st::msgDateImgDelta;
if (rtl()) rectx = _width - rectx - rectw;
// Make the bottom of the rect at the same level as the bottom of the info rect.
recty -= st::msgDateImgDelta;
App::roundRect(p, rectx, recty, rectw, recth, selected ? st::msgServiceBgSelected : st::msgServiceBg, selected ? StickerSelectedCorners : StickerCorners);
p.setPen(st::msgServiceFg);
rectx += st::msgReplyPadding.left();
@ -2770,12 +2767,9 @@ HistoryTextState HistorySticker::getState(QPoint point, HistoryStateRequest requ
recth += st::msgReplyBarSize.height();
}
int rectx = isPost ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left()));
int recty = _height - recth;
int recty = st::msgDateImgDelta;
if (rtl()) rectx = _width - rectx - rectw;
// Make the bottom of the rect at the same level as the bottom of the info rect.
recty -= st::msgDateImgDelta;
if (via) {
int viah = st::msgReplyPadding.top() + st::msgServiceNameFont->height + (reply ? 0 : st::msgReplyPadding.bottom());
if (QRect(rectx, recty, rectw, viah).contains(point)) {