Fixed display of selection marks for messages with huge code blocks.

This commit is contained in:
23rd 2024-10-18 02:19:33 +03:00 committed by John Preston
parent b1e537e54e
commit ed9dcef66f

View file

@ -1615,14 +1615,16 @@ 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)
? std::min(
(_bubbleWidthLimit
+ st::msgPhotoSkip
+ st::msgSelectionOffset
+ st::msgPadding.left()
+ st.size),
width())
: width();
const auto pos = QPoint(
(right
(width()
- (st::msgSelectionOffset * progress - st.size) / 2
- st::msgPadding.right() / 2
- st.size),