From e646b4dc9a2e76941f8c7bff4379c9e663b0cefc Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 15 Oct 2024 12:59:15 +0300 Subject: [PATCH] Slightly improved position of selection marks for wide chats. --- .../SourceFiles/history/view/history_view_message.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 6e017b597..c57dc2848 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1614,8 +1614,15 @@ void Message::draw(Painter &p, const PaintContext &context) const { } const auto o = ScopedPainterOpacity(p, progress); const auto &st = st::msgSelectionCheck; + const auto right = delegate()->elementIsChatWide() + ? (st::msgMaxWidth + + st::msgPhotoSkip + + st::msgSelectionOffset + + st::msgPadding.left() + + st.size) + : width(); const auto pos = QPoint( - (width() + (right - (st::msgSelectionOffset * progress - st.size) / 2 - st::msgPadding.right() / 2 - st.size),