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 o = ScopedPainterOpacity(p, progress);
const auto &st = st::msgSelectionCheck; const auto &st = st::msgSelectionCheck;
const auto right = delegate()->elementIsChatWide() const auto right = delegate()->elementIsChatWide()
? (st::msgMaxWidth ? std::min(
+ st::msgPhotoSkip (_bubbleWidthLimit
+ st::msgSelectionOffset + st::msgPhotoSkip
+ st::msgPadding.left() + st::msgSelectionOffset
+ st.size) + st::msgPadding.left()
+ st.size),
width())
: width(); : width();
const auto pos = QPoint( const auto pos = QPoint(
(right (width()
- (st::msgSelectionOffset * progress - st.size) / 2 - (st::msgSelectionOffset * progress - st.size) / 2
- st::msgPadding.right() / 2 - st::msgPadding.right() / 2
- st.size), - st.size),