Skip to content
Permalink
Browse files

Don't hardcode font family for python editor line numbers

  • Loading branch information
nyalldawson committed Oct 3, 2020
1 parent ad946d4 commit 5ed37da0b81df93c3571f371c62cedceb47df100
Showing with 2 additions and 2 deletions.
  1. +0 −1 python/console/console_base.py
  2. +2 −1 src/gui/qgscodeeditor.cpp
@@ -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")
@@ -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" ) );

0 comments on commit 5ed37da

Please sign in to comment.
You can’t perform that action at this time.