From 397e1dde78500e8ca7e16e26c27883cb4726b1ce Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 15 Jul 2017 15:05:46 +0300 Subject: [PATCH] Move reply bar to the top of the sticker. That way a fast share button in channels isn't overlapping with it. --- Telegram/SourceFiles/history/history_media_types.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/history/history_media_types.cpp b/Telegram/SourceFiles/history/history_media_types.cpp index 03fce696c3..51e152402f 100644 --- a/Telegram/SourceFiles/history/history_media_types.cpp +++ b/Telegram/SourceFiles/history/history_media_types.cpp @@ -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)) {