From 65c2a284d7012967032b52c5e03cd85d147d3ed2 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 1 Mar 2024 20:42:35 +0800 Subject: [PATCH] wrong indent fill for non-monospace font --- libs/qsynedit/qsynedit/painter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/qsynedit/qsynedit/painter.cpp b/libs/qsynedit/qsynedit/painter.cpp index 67d36899..f0219ee6 100644 --- a/libs/qsynedit/qsynedit/painter.cpp +++ b/libs/qsynedit/qsynedit/painter.cpp @@ -782,9 +782,9 @@ void QSynEditPainter::paintFoldAttributes() if (mEdit->mCodeFolding.fillIndents) { int X1; if (tabSteps>lineIndent) - X1 = lineIndent * mEdit->mCharWidth + mEdit->textOffset() - 1; + X1 = lineIndent * mEdit->mDocument->spaceWidth() + mEdit->textOffset() - 1; else - X1 = tabSteps * mEdit->mCharWidth + mEdit->textOffset() - 1; + X1 = tabSteps * mEdit->mDocument->spaceWidth() + mEdit->textOffset() - 1; gradientStart.setAlpha(20); gradientEnd.setAlpha(10); QLinearGradient gradient(X,Y,X1,Y);