Mercurial > hg > octave-lyh
comparison gui/src/MainWindow.cpp @ 13659:d98c6ef06dff
included some editor setting into the setting dialog
author | ttl <ttl@justmail.de> |
---|---|
date | Sun, 28 Aug 2011 20:53:15 +0200 |
parents | 347dfbea2c8a |
children | 68c50b393f1d |
comparison
equal
deleted
inserted
replaced
13658:d5b84316610d | 13659:d98c6ef06dff |
---|---|
72 // check whether lexer is already prepared and prepare it if not | 72 // check whether lexer is already prepared and prepare it if not |
73 if ( m_lexer == NULL ) | 73 if ( m_lexer == NULL ) |
74 { | 74 { |
75 // this has to be done only once, not for each editor | 75 // this has to be done only once, not for each editor |
76 m_lexer = new LexerOctaveGui(); | 76 m_lexer = new LexerOctaveGui(); |
77 m_lexer->setDefaultFont(QFont("Monospace",10)); | 77 // Editor font (default or from settings) |
78 QSettings *settings = ResourceManager::instance ()->settings (); | |
79 m_lexer->setDefaultFont( QFont( | |
80 settings->value ("editor/fontName","Courier").toString (), | |
81 settings->value ("editor/fontSize",10).toInt () ) ); | |
78 // TODO: Autoindent not working as it should | 82 // TODO: Autoindent not working as it should |
79 m_lexer->setAutoIndentStyle(QsciScintilla::AiMaintain || | 83 m_lexer->setAutoIndentStyle(QsciScintilla::AiMaintain || |
80 QsciScintilla::AiOpening || | 84 QsciScintilla::AiOpening || |
81 QsciScintilla::AiClosing); | 85 QsciScintilla::AiClosing); |
82 // The API info that is used for auto completion | 86 // The API info that is used for auto completion |