Revert "Editor: Make line spacing adjustable"

This does not work with text wrapping since there are multiple
QTextLines inside a block but we can not adjust the line hight inside a
block. This needs to be addressed inside Qt.

This reverts commit dc64f3207b.

Change-Id: If6c28056da9891eeeb75f5939a42f08360013a80
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-10-15 08:52:48 +02:00
parent a962a08b1a
commit f220cb0e23
8 changed files with 86 additions and 199 deletions

View File

@@ -24,13 +24,8 @@
****************************************************************************/
#include "textdocumentlayout.h"
#include "fontsettings.h"
#include "textdocument.h"
#include "texteditorsettings.h"
#include <utils/qtcassert.h>
#include <QDebug>
namespace TextEditor {
@@ -630,9 +625,6 @@ 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;