TextEditor: Add option to display annotation between lines

Task-number: QTCREATORBUG-19181
Change-Id: I9b3957c678c08ca2f3ddf9cfa5ff272241547471
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2017-10-26 15:18:56 +02:00
parent c751e6afa7
commit c815d456ed
7 changed files with 72 additions and 20 deletions

View File

@@ -634,6 +634,14 @@ void TextDocumentLayout::updateMarksBlock(const QTextBlock &block)
mrk->updateBlock(block);
}
QRectF TextDocumentLayout::blockBoundingRect(const QTextBlock &block) const
{
QRectF boundingRect = QPlainTextDocumentLayout::blockBoundingRect(block);
if (TextBlockUserData *userData = testUserData(block))
boundingRect.adjust(0, 0, 0, userData->additionalAnnotationHeight());
return boundingRect;
}
TextDocumentLayout::FoldValidator::FoldValidator()
: m_layout(0)
, m_requestDocUpdate(false)