mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 19:40:54 +00:00
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:
parent
a935075782
commit
397e1dde78
@ -2710,12 +2710,9 @@ void HistorySticker::draw(Painter &p, const QRect &r, TextSelection selection, T
|
|||||||
recth += st::msgReplyBarSize.height();
|
recth += st::msgReplyBarSize.height();
|
||||||
}
|
}
|
||||||
int rectx = isPost ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left()));
|
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;
|
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);
|
App::roundRect(p, rectx, recty, rectw, recth, selected ? st::msgServiceBgSelected : st::msgServiceBg, selected ? StickerSelectedCorners : StickerCorners);
|
||||||
p.setPen(st::msgServiceFg);
|
p.setPen(st::msgServiceFg);
|
||||||
rectx += st::msgReplyPadding.left();
|
rectx += st::msgReplyPadding.left();
|
||||||
@ -2770,12 +2767,9 @@ HistoryTextState HistorySticker::getState(QPoint point, HistoryStateRequest requ
|
|||||||
recth += st::msgReplyBarSize.height();
|
recth += st::msgReplyBarSize.height();
|
||||||
}
|
}
|
||||||
int rectx = isPost ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left()));
|
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;
|
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) {
|
if (via) {
|
||||||
int viah = st::msgReplyPadding.top() + st::msgServiceNameFont->height + (reply ? 0 : st::msgReplyPadding.bottom());
|
int viah = st::msgReplyPadding.top() + st::msgServiceNameFont->height + (reply ? 0 : st::msgReplyPadding.bottom());
|
||||||
if (QRect(rectx, recty, rectw, viah).contains(point)) {
|
if (QRect(rectx, recty, rectw, viah).contains(point)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user