Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- OMEdit now asks for the default monospace font instead of default system font


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9626 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Aug 10, 2011
1 parent 8b539f0 commit badf640
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OMEdit/OMEditGUI/OptionsWidget.cpp
Expand Up @@ -35,8 +35,12 @@

ModelicaTextSettings::ModelicaTextSettings()
{
// This is a very convoluted way of asking for the default monospace font in Qt
QFont font("I'm a font that does not exist, so that we will search for the style hint");
font.setStyleHint(QFont::TypeWriter);
QFontInfo info(font);
// set default values, will be handy if we are unable to create the xml file
setFontFamily(qApp->font().family()); // get system font
setFontFamily(info.family()); // get system font
setFontSize(10);
setTextRuleColor(QColor(0, 0, 0)); // black
setKeywordRuleColor(QColor(139, 0, 0)); // dark red
Expand Down

0 comments on commit badf640

Please sign in to comment.