Fixed display of ellipsis under spoiler.

This commit is contained in:
23rd 2022-01-08 09:12:24 +03:00
parent 20b908ea70
commit 087c82e1d5

View file

@ -1700,8 +1700,10 @@ private:
? fillSpoilerOpacity() ? fillSpoilerOpacity()
: 0.; : 0.;
const auto opacity = _p->opacity(); const auto opacity = _p->opacity();
if (spoilerOpacity < 1.) { const auto isElidedBlock = (!rtl)
if (hasSpoiler) { && (_indexOfElidedBlock == blockIndex);
if ((spoilerOpacity < 1.) || isElidedBlock) {
if (hasSpoiler && !isElidedBlock) {
_p->setOpacity(opacity * (1. - spoilerOpacity)); _p->setOpacity(opacity * (1. - spoilerOpacity));
} }
if (Q_UNLIKELY(hasSelected)) { if (Q_UNLIKELY(hasSelected)) {
@ -1807,7 +1809,9 @@ private:
: (blockIndex > 0) : (blockIndex > 0)
? _t->_blocks[blockIndex - 1]->spoilerIndex() ? _t->_blocks[blockIndex - 1]->spoilerIndex()
: 0; : 0;
const auto will = (positionTill < blockEnd) const auto will = elideOffset
? 0
: (positionTill < blockEnd)
? now ? now
: nextBlock : nextBlock
? nextBlock->spoilerIndex() ? nextBlock->spoilerIndex()