aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-22 15:30:31 -0400
committerKen Moore <ken@ixsystems.com>2017-06-22 15:30:31 -0400
commit4715c9dc6f969afb66a23d2321a13fabaa93edc4 (patch)
tree53b02883ad11686f15659dd9b08ec2554c68761b /src-qt5
parentFlesh out the public functions which can be used for an OutputDevice in Lumin... (diff)
downloadlumina-4715c9dc6f969afb66a23d2321a13fabaa93edc4.tar.gz
lumina-4715c9dc6f969afb66a23d2321a13fabaa93edc4.tar.bz2
lumina-4715c9dc6f969afb66a23d2321a13fabaa93edc4.zip
Fix up the font weight setting for the new syntax highlighting rule formats.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp9
1 files 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<files.length(); i++){
if(files[i].supportsFile(filename)){ return files[i].name(); }
}
-
- /*QString suffix = filename.section(".",-1);
- if(suffix=="cpp" || suffix=="hpp" || suffix=="c" || suffix=="h"){ return "C++"; }
- //else if(suffix=="py" || suffix=="pyc"){ return "Python"; }
- else if(suffix=="sh"){ return "Shell"; }
- else if(suffix=="rst"){ return "reST"; }*/
return "";
}
bgstack15