From 4715c9dc6f969afb66a23d2321a13fabaa93edc4 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 22 Jun 2017 15:30:31 -0400 Subject: Fix up the font weight setting for the new syntax highlighting rule formats. --- src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp index 646c2e98..53f51f4e 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp @@ -123,12 +123,13 @@ bool SyntaxFile::LoadFile(QString file, QSettings *settings){ 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 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) @@ -205,12 +206,6 @@ QString Custom_Syntax::ruleForFile(QString filename, QSettings *settings){ for(int i=0; i