Skip to content
Permalink
Browse files

[ui][html code editor] use monospace font

  • Loading branch information
nirvn committed Jul 24, 2018
1 parent a9f924f commit 845e87a75b0e0b3411211532e734ffa40c8d4c6a
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 845e87a

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