Fix color schemes (brace highlight / selection color / line-end markers).

master
Torsten Paul 2014-12-20 02:51:11 +01:00
parent f42dbea817
commit b1871c6309
8 changed files with 154 additions and 75 deletions

View File

@ -1,31 +1,37 @@
{
"name" : "For Dark Background",
"index" : 1100,
"paper" : "#272822",
"text" : "#ffffff",
"paper" : "#222222",
"text" : "#e0e0e0",
"caret" : {
"width" : 2,
"foreground" : "#ffff00",
"line-background" : "#68e1687f"
"line-background" : "#303030"
},
"colors" : {
"keyword1" : "#f12971",
"keyword1" : "#90ee90",
"keyword2" : "#56dbf0",
"keyword3" : "#56d8f0",
"comment" : "#ccdf32",
"number" : "#af7dff",
"keyword3" : "#add8e6",
"comment" : "#808080",
"commentline" : "#808080",
"commentdoc" : "#808080",
"commentdockeyword" : "#808080",
"number" : "#ff0000",
"string" : "#e6db74",
"operator" : "#d8d8d8",
"commentline" : "#e6db74",
"selection-foreground" : "#ffff00",
"selection-background" : "#a0a0ff",
"margin-background" : "#14141496",
"margin-foreground" : "#fff",
"matched-brace-background" : "#333",
"matched-brace-foreground" : "#fff",
"unmatched-brace-background" : "#333",
"unmatched-brace-foreground" : "#fff",
"operator" : "#e8b609",
"whitespace-background" : "#222222",
"whitespace-foreground" : "#e0e0e0",
"selection-foreground" : "#ffffff",
"selection-background" : "#4a90d9",
"margin-background" : "#272822",
"margin-foreground" : "#e0e0e0",
"matched-brace-background" : "#505050",
"matched-brace-foreground" : "#ffffff",
"unmatched-brace-background" : "#dc322f",
"unmatched-brace-foreground" : "#fdf6e3",
"error-marker" : "#ff0000",
"error-indicator" : "#60ff0000",
"error-indicator-outline" : "#ff000000",
"edge" : "#ffffff"
}
}

View File

@ -1,24 +1,28 @@
{
"name" : "For Light Background",
"index" : 1000,
"paper" : "#fff",
"paper" : "#ffffff",
"text" : "#272822",
"caret" : {
"width" : 2,
"foreground" : "#000000",
"line-background" : "#ffe4e4"
"line-background" : "#f0f0f0"
},
"colors" : {
"keyword1" : "Green",
"keyword2" : "Green",
"keyword3" : "DarkBlue",
"comment" : "DarkCyan",
"commentline" : "DarkCyan",
"commentdoc" : "DarkCyan",
"commentdockeyword" : "DarkCyan",
"number" : "DarkRed",
"string" : "DarkMagenta",
"operator" : "Blue",
"commentline" : "DarkCyan",
"selection-foreground" : "#ffff00",
"selection-background" : "#a0a0ff",
"whitespace-background" : "#ffffff",
"whitespace-foreground" : "#272822",
"selection-foreground" : "#ffffff",
"selection-background" : "#4a90d9",
"margin-background" : "#ccc",
"margin-foreground" : "#111",
"matched-brace-background" : "#333",
@ -26,6 +30,8 @@
"unmatched-brace-background" : "#333",
"unmatched-brace-foreground" : "#fff",
"error-marker" : "#ff0000",
"error-indicator" : "#60ff0000",
"error-indicator-outline" : "#ff000000",
"edge" : "#ffffff"
}
}

View File

@ -5,27 +5,33 @@
"text" : "#f8f8f2",
"caret" : {
"width" : 2,
"foreground" : "#ffff00",
"line-background" : "#3e3d32"
"foreground" : "#f8f8f0",
"line-background" : "#49483e"
},
"colors" : {
"keyword1" : "#66c3b3",
"keyword2" : "#79abff",
"keyword3" : "#ffffff",
"comment" : "#ccdf32",
"number" : "#7fb347",
"string" : "#e6db74",
"operator" : "#d8d8d8",
"keyword1" : "#66d9ef",
"keyword2" : "#a6e22e",
"keyword3" : "#f92672",
"comment" : "#75715e",
"commentline" : "#75715e",
"selection-foreground" : "#ffff00",
"selection-background" : "#a0a0ff",
"margin-background" : "#757575",
"commentdoc" : "#75715e",
"commentdockeyword" : "#7b9a3c",
"number" : "#ae81ff",
"string" : "#e6db74",
"operator" : "#f92672",
"whitespace-background" : "#272822",
"whitespace-foreground" : "#f8f8f2",
"selection-foreground" : "#272822",
"selection-background" : "#f8f8f2",
"margin-background" : "#3e3d32",
"margin-foreground" : "#f8f8f2",
"matched-brace-background" : "#333",
"matched-brace-foreground" : "#fff",
"unmatched-brace-background" : "#333",
"unmatched-brace-foreground" : "#fff",
"matched-brace-background" : "#606060",
"matched-brace-foreground" : "#f8f8f2",
"unmatched-brace-background" : "#dc322f",
"unmatched-brace-foreground" : "#f8f8f2",
"error-marker" : "#ff0000",
"error-indicator" : "#80ffe0e0",
"error-indicator-outline" : "#ff000000",
"edge" : "#ffffff"
}
}

View File

@ -0,0 +1,37 @@
{
"name" : "Solarized (dark)",
"index" : 1310,
"paper" : "#002b36",
"text" : "#839496",
"caret" : {
"width" : 2,
"foreground" : "#fff070",
"line-background" : "#073642"
},
"colors" : {
"keyword1" : "#268ad1",
"keyword2" : "#2aa198",
"keyword3" : "#859900",
"comment" : "#657b83",
"commentline" : "#657b83",
"commentdoc" : "#657b83",
"commentdockeyword" : "#6c71c4",
"number" : "#d33682",
"string" : "#b58900",
"operator" : "#cb4b16",
"whitespace-background" : "#002b36",
"whitespace-foreground" : "#839496",
"selection-foreground" : "#fdf6e3",
"selection-background" : "#657b83",
"margin-background" : "#002b36",
"margin-foreground" : "#839496",
"matched-brace-background" : "#93a1a1",
"matched-brace-foreground" : "#586e75",
"unmatched-brace-background" : "#dc322f",
"unmatched-brace-foreground" : "#fdf6e3",
"error-marker" : "#ff0000",
"error-indicator" : "#90ff8080",
"error-indicator-outline" : "#ff000000",
"edge" : "#d33682"
}
}

View File

@ -0,0 +1,37 @@
{
"name" : "Solarized (light)",
"index" : 1300,
"paper" : "#fdf6e3",
"text" : "#657b83",
"caret" : {
"width" : 2,
"foreground" : "#000000",
"line-background" : "#eee8d5"
},
"colors" : {
"keyword1" : "#268ad1",
"keyword2" : "#2aa198",
"keyword3" : "#859900",
"comment" : "#93a1a1",
"commentline" : "#93a1a1",
"commentdoc" : "#93a1a1",
"commentdockeyword" : "#6c71c4",
"number" : "#d33682",
"string" : "#b58900",
"operator" : "#cb4b16",
"whitespace-background" : "#fdf6e3",
"whitespace-foreground" : "#657b83",
"selection-foreground" : "#fdf6e3",
"selection-background" : "#657b83",
"margin-background" : "#eee8d5",
"margin-foreground" : "#657b83",
"matched-brace-background" : "#93a1a1",
"matched-brace-foreground" : "#586e75",
"unmatched-brace-background" : "#ed8987",
"unmatched-brace-foreground" : "#fdf6e3",
"error-marker" : "#ff0000",
"error-indicator" : "#80ff0000",
"error-indicator-outline" : "#ff000000",
"edge" : "#d33682"
}
}

View File

@ -1,31 +0,0 @@
{
"name" : "Solarized",
"index" : 1300,
"paper" : "#fdf6e3",
"text" : "#657b83",
"caret" : {
"width" : 2,
"foreground" : "#0000ff",
"line-background" : "#eeead5"
},
"colors" : {
"keyword1" : "#268ad1",
"keyword2" : "#6c71c4",
"keyword3" : "#b58800",
"comment" : "#b58900",
"number" : "#cb4b16",
"string" : "#2aa198",
"operator" : "#859900",
"commentline" : "#b58800",
"selection-foreground" : "#fdf6e3",
"selection-background" : "#657b83",
"margin-background" : "#eee8d5",
"margin-foreground" : "#93a1a1",
"matched-brace-background" : "#333",
"matched-brace-foreground" : "#fff",
"unmatched-brace-background" : "#333",
"unmatched-brace-foreground" : "#fff",
"error-marker" : "#ff0000",
"edge" : "#ffffff"
}
}

View File

@ -1,22 +1,26 @@
{
"name" : "Visual Studio",
"index" : 1400,
"paper" : "white",
"text" : "#111",
"paper" : "#ffffff",
"text" : "#101010",
"caret" : {
"width" : 2,
"foreground" : "#000000",
"line-background" : "#eee"
"line-background" : "#eeeeee"
},
"colors" : {
"keyword1" : "blue",
"keyword2" : "blue",
"keyword3" : "#2B91AF",
"comment" : "DarkGreen",
"commentline" : "DarkGreen",
"commentdoc" : "#DarkGreen",
"commentdockeyword" : "#DarkGreen",
"number" : "DarkRed",
"string" : "#A31515",
"operator" : "Blue",
"commentline" : "DarkGreen",
"whitespace-background" : "#ffffff",
"whitespace-foreground" : "#101010",
"selection-foreground" : "black",
"selection-background" : "lightblue",
"margin-background" : "white",
@ -24,8 +28,10 @@
"matched-brace-background" : "darkgrey",
"matched-brace-foreground" : "black",
"unmatched-brace-background" : "red",
"unmatched-brace-foreground" : "#fff",
"unmatched-brace-foreground" : "#ffffff",
"error-marker" : "#ff0000",
"error-indicator" : "#60ff0000",
"error-indicator-outline" : "#ff000000",
"edge" : "#ffffff"
}
}

View File

@ -175,11 +175,15 @@ void ScintillaEditor::setColormap(const EditorColorScheme *colorScheme)
lexer->setColor(readColor(colors, "keyword1", textColor), QsciLexerCPP::Keyword);
lexer->setColor(readColor(colors, "keyword2", textColor), QsciLexerCPP::KeywordSet2);
lexer->setColor(readColor(colors, "keyword3", textColor), QsciLexerCPP::GlobalClass);
lexer->setColor(readColor(colors, "comment", textColor), QsciLexerCPP::CommentDocKeyword);
lexer->setColor(readColor(colors, "number", textColor), QsciLexerCPP::Number);
lexer->setColor(readColor(colors, "string", textColor), QsciLexerCPP::SingleQuotedString);
lexer->setColor(readColor(colors, "string", textColor), QsciLexerCPP::DoubleQuotedString);
lexer->setColor(readColor(colors, "operator", textColor), QsciLexerCPP::Operator);
lexer->setColor(readColor(colors, "comment", textColor), QsciLexerCPP::Comment);
lexer->setColor(readColor(colors, "commentline", textColor), QsciLexerCPP::CommentLine);
lexer->setColor(readColor(colors, "commentdoc", textColor), QsciLexerCPP::CommentDoc);
lexer->setColor(readColor(colors, "commentdoc", textColor), QsciLexerCPP::CommentLineDoc);
lexer->setColor(readColor(colors, "commentdockeyword", textColor), QsciLexerCPP::CommentDocKeyword);
const boost::property_tree::ptree& caret = pt.get_child("caret");
@ -188,6 +192,10 @@ void ScintillaEditor::setColormap(const EditorColorScheme *colorScheme)
qsci->setCaretLineBackgroundColor(readColor(caret, "line-background", paperColor));
qsci->setMarkerBackgroundColor(readColor(colors, "error-marker", QColor(255, 0, 0, 100)), markerNumber);
qsci->setIndicatorForegroundColor(readColor(colors, "error-indicator", QColor(255, 0, 0, 100)), indicatorNumber);
qsci->setIndicatorOutlineColor(readColor(colors, "error-indicator-outline", QColor(255, 0, 0, 100)), indicatorNumber);
qsci->setWhitespaceBackgroundColor(readColor(colors, "whitespace-background", paperColor));
qsci->setWhitespaceForegroundColor(readColor(colors, "whitespace-foreground", textColor));
qsci->setMarginsBackgroundColor(readColor(colors, "margin-background", paperColor));
qsci->setMarginsForegroundColor(readColor(colors, "margin-foreground", textColor));
qsci->setMatchedBraceBackgroundColor(readColor(colors, "matched-brace-background", paperColor));
@ -211,7 +219,11 @@ void ScintillaEditor::noColor()
qsci->setCaretWidth(2);
qsci->setCaretForegroundColor(Qt::black);
qsci->setMarkerBackgroundColor(QColor(255, 0, 0, 100), markerNumber);
qsci->setIndicatorForegroundColor(QColor(255, 0, 0, 128), indicatorNumber);
qsci->setIndicatorOutlineColor(QColor(0, 0, 0, 255), indicatorNumber); // only alpha part is used
qsci->setCaretLineBackgroundColor(Qt::white);
qsci->setWhitespaceBackgroundColor(Qt::white);
qsci->setWhitespaceForegroundColor(Qt::black);
qsci->setMarginsBackgroundColor(Qt::white);
qsci->setMarginsForegroundColor(Qt::black);
qsci->setSelectionForegroundColor(Qt::white);