Skip to content
Permalink
Browse files

[ui][html code editor] use monospace font

(cherry-picked from 845e87a)
  • Loading branch information
nirvn authored and nyalldawson committed Jul 24, 2018
1 parent b3879cf commit a565b4c4a89e123147de707e954408536f1f5efa
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/gui/qgscodeeditorhtml.cpp
@@ -36,8 +36,14 @@ QgsCodeEditorHTML::QgsCodeEditorHTML( QWidget *parent )

void QgsCodeEditorHTML::setSciLexerHTML()
{
QsciLexerHTML *lexer = new QsciLexerHTML( this );
lexer->setDefaultFont( QFont( QStringLiteral( "Sans" ), 10 ) );
QFont font = getMonospaceFont();
#ifdef Q_OS_MAC
// The font size gotten from getMonospaceFont() is too small on Mac
font.setPointSize( QLabel().font().pointSize() );
#endif

QsciLexerHTML *lexer = new QsciLexerHTML( this );
lexer->setDefaultFont( font );
lexer->setFont( font, -1 );
setLexer( lexer );
}

0 comments on commit a565b4c

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