Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[ui][html code editor] use monospace font
- Loading branch information
Showing
with
8 additions
and
2 deletions.
-
+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 ); |
|
|
} |