From 9ea78f7d28d4b26c9ad7ae548dbc3e660d8abad1 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 14 Oct 2024 06:04:19 +0300 Subject: [PATCH] Fixed display of message highlights in selection mode. --- .../history/view/history_view_message.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 7c189084e..6e017b597 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1193,10 +1193,18 @@ void Message::draw(Painter &p, const PaintContext &context) const { } } - if (customHighlight) { - media->drawHighlight(p, context, localMediaTop); - } else { - paintHighlight(p, context, fullGeometry.height()); + { + if (selectionTranslation) { + p.translate(-selectionTranslation, 0); + } + if (customHighlight) { + media->drawHighlight(p, context, localMediaTop); + } else { + paintHighlight(p, context, fullGeometry.height()); + } + if (selectionTranslation) { + p.translate(selectionTranslation, 0); + } } const auto roll = media ? media->bubbleRoll() : Media::BubbleRoll();