Wrong indent line position for non-monospace fonts.
This commit is contained in:
parent
cb66c7f340
commit
f0f79c2917
|
@ -540,7 +540,13 @@ public:
|
|||
}
|
||||
|
||||
int tabWidth() const {
|
||||
return mTabSize * mSpaceWidth;
|
||||
return mTabSize * spaceWidth();
|
||||
}
|
||||
|
||||
int spaceWidth() const {
|
||||
if (mForceMonospace)
|
||||
return mCharWidth;
|
||||
return mSpaceWidth;
|
||||
}
|
||||
|
||||
void setTabSize(int newTabSize);
|
||||
|
|
|
@ -761,7 +761,7 @@ void QSynEditPainter::paintFoldAttributes()
|
|||
tabSteps = 0;
|
||||
indentLevel = 0;
|
||||
while (tabSteps < lineIndent) {
|
||||
X = tabSteps * mEdit->mCharWidth + mEdit->textOffset() - 1;
|
||||
X = tabSteps * mEdit->mDocument->spaceWidth() + mEdit->textOffset() - 1;
|
||||
tabSteps+=mEdit->tabSize();
|
||||
indentLevel++ ;
|
||||
if (mEdit->mSyntaxer) {
|
||||
|
|
Loading…
Reference in New Issue