Skip to content

Commit

Permalink
Don't hardcode font family for python editor line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 3, 2020
1 parent ad946d4 commit 5ed37da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion python/console/console_base.py
Expand Up @@ -40,7 +40,6 @@ def __init__(self, parent=None):
# Set the default font
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
self.setFont(font)
self.setMarginsFont(font)

# Margin 0 is used for line numbers (editor and output)
self.setMarginWidth(0, "00000")
Expand Down
3 changes: 2 additions & 1 deletion src/gui/qgscodeeditor.cpp
Expand Up @@ -174,7 +174,8 @@ void QgsCodeEditor::setMarginVisible( bool margin )
mMargin = margin;
if ( margin )
{
QFont marginFont( QStringLiteral( "Courier" ), 10 );
QFont marginFont = getMonospaceFont();
marginFont.setPointSize( 10 );
setMarginLineNumbers( 1, true );
setMarginsFont( marginFont );
setMarginWidth( 1, QStringLiteral( "00000" ) );
Expand Down

0 comments on commit 5ed37da

Please sign in to comment.