From 087c82e1d5b5731610019df04d44ae1c44fb941d Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 8 Jan 2022 09:12:24 +0300 Subject: [PATCH] Fixed display of ellipsis under spoiler. --- ui/text/text.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/text/text.cpp b/ui/text/text.cpp index c9deba4..e3a34df 100644 --- a/ui/text/text.cpp +++ b/ui/text/text.cpp @@ -1700,8 +1700,10 @@ private: ? fillSpoilerOpacity() : 0.; const auto opacity = _p->opacity(); - if (spoilerOpacity < 1.) { - if (hasSpoiler) { + const auto isElidedBlock = (!rtl) + && (_indexOfElidedBlock == blockIndex); + if ((spoilerOpacity < 1.) || isElidedBlock) { + if (hasSpoiler && !isElidedBlock) { _p->setOpacity(opacity * (1. - spoilerOpacity)); } if (Q_UNLIKELY(hasSelected)) { @@ -1807,7 +1809,9 @@ private: : (blockIndex > 0) ? _t->_blocks[blockIndex - 1]->spoilerIndex() : 0; - const auto will = (positionTill < blockEnd) + const auto will = elideOffset + ? 0 + : (positionTill < blockEnd) ? now : nextBlock ? nextBlock->spoilerIndex()