wrong indent fill for non-monospace font

This commit is contained in:
Roy Qu 2024-03-01 20:42:35 +08:00
parent f0f79c2917
commit 65c2a284d7
1 changed files with 2 additions and 2 deletions

View File

@ -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);