fix line numbers position recalculation

This commit is contained in:
m
2015-06-23 02:57:26 +08:00
parent 84ba7d8a17
commit 9af70c042e

View File

@@ -63,7 +63,7 @@ void SqlTextEdit::updateLineNumberAreaWidth()
// Calculate the width of this number if it was all zeros (this is because a 1 might require less space than a 0 and this could
// cause some flickering depending on the font) and set the new margin width.
QFont font = lexer()->defaultFont(QsciLexerSQL::Default);
QFont font = lexer()->font(QsciLexerSQL::Default);
setMarginWidth(0, QFontMetrics(font).width(QString("0").repeated(digits)) + 5);
}