diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 86cdb4fcb..669ad90fa 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1495,11 +1495,17 @@ void Message::draw(Painter &p, const PaintContext &context) const { constexpr auto kBouncePart = 0.25; constexpr auto kStrokeWidth = 2.; constexpr auto kWaveWidth = 10.; + const auto isLeftSize = (!context.outbg) + || delegate()->elementIsChatWide(); const auto ratio = std::min(context.gestureHorizontal.ratio, 1.); const auto reachRatio = context.gestureHorizontal.reachRatio; const auto size = st::historyFastShareSize; + const auto outerWidth = st::historySwipeIconSkip + + (isLeftSize ? rect::right(g) : width()); const auto rect = QRectF( - width() - (size * kShiftRatio) * context.gestureHorizontal.ratio, + outerWidth + - (size * kShiftRatio * context.gestureHorizontal.ratio) + - (st::historySwipeIconSkip * ratio * (isLeftSize ? .7 : 1.)), g.y() + (g.height() - size) / 2, size, size); @@ -1533,13 +1539,7 @@ void Message::draw(Painter &p, const PaintContext &context) const { p.translate(-center); // All the next draws are mirrored. p.drawEllipse(rect); - context.st->historyFastShareIcon().paintInCenter( - p, - QRect( - base::SafeRound(rect.x()), - base::SafeRound(rect.y()), - base::SafeRound(rect.width()), - base::SafeRound(rect.height()))); + context.st->historyFastShareIcon().paintInCenter(p, rect); p.setPen(pen); p.setBrush(Qt::NoBrush); p.drawArc(arcRect, arc::kQuarterLength, spanAngle); diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 27b9e36c1..42e580fa6 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -570,6 +570,8 @@ historyFastTranscribeLockPos: point(18px, 13px); historyFastTranscribeLockOverlayPos: point(21px, 13px); historyFastTranscribeLockOverlaySize: size(6px, 10px); +historySwipeIconSkip: 80px; + historySavedFont: font(semibold 14px); historyGroupWidthMax: maxMediaSize;