diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp index 46ca056b..87592e6c 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp @@ -118,12 +118,15 @@ bool SyntaxFile::LoadFile(QString file, QSettings *settings){ //Now load the appearance logic if(rule.contains("foreground")){ tmp.format.setForeground( colorFromOption(rule.value("foreground").toString(), settings) ); } if(rule.contains("background")){ tmp.format.setBackground( colorFromOption(rule.value("background").toString(), settings) ); } - if(rule.contains("font-weight")){ - QString wgt = rule.value("font-weight").toString(); + if(rule.contains("font_weight")){ + QString wgt = rule.value("font_weight").toString(); if(wgt =="bold"){ tmp.format.setFontWeight(QFont::Bold); } if(wgt =="light"){ tmp.format.setFontWeight(QFont::Light); } else{ tmp.format.setFontWeight(QFont::Normal); } } + if(rule.contains("font_style")){ + if(rule.value("font_style").toString()=="italic"){ tmp.format.setFontItalic(true); } + } //Now save the rule(s) to the list if(rule.contains("words")){ //special logic - this generates a bunch of rules all at once (one per word) |