forked from qt-creator/qt-creator
Editor: Make line spacing adjustable
Fixes: QTCREATORBUG-13727 Change-Id: I3dbc3277795b339bced81dc6c5a048c828183cb6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -24,8 +24,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "textdocumentlayout.h"
|
||||
|
||||
#include "fontsettings.h"
|
||||
#include "textdocument.h"
|
||||
#include "texteditorsettings.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace TextEditor {
|
||||
@@ -625,6 +630,9 @@ void TextDocumentLayout::updateMarksBlock(const QTextBlock &block)
|
||||
QRectF TextDocumentLayout::blockBoundingRect(const QTextBlock &block) const
|
||||
{
|
||||
QRectF boundingRect = QPlainTextDocumentLayout::blockBoundingRect(block);
|
||||
if (boundingRect.isNull())
|
||||
return boundingRect;
|
||||
boundingRect.setHeight(TextEditorSettings::fontSettings().lineSpacing());
|
||||
if (TextBlockUserData *userData = textUserData(block))
|
||||
boundingRect.adjust(0, 0, 0, userData->additionalAnnotationHeight());
|
||||
return boundingRect;
|
||||
|
||||
Reference in New Issue
Block a user