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

View File

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

View File

@ -5,27 +5,33 @@
"text" : "#f8f8f2", "text" : "#f8f8f2",
"caret" : { "caret" : {
"width" : 2, "width" : 2,
"foreground" : "#ffff00", "foreground" : "#f8f8f0",
"line-background" : "#3e3d32" "line-background" : "#49483e"
}, },
"colors" : { "colors" : {
"keyword1" : "#66c3b3", "keyword1" : "#66d9ef",
"keyword2" : "#79abff", "keyword2" : "#a6e22e",
"keyword3" : "#ffffff", "keyword3" : "#f92672",
"comment" : "#ccdf32", "comment" : "#75715e",
"number" : "#7fb347",
"string" : "#e6db74",
"operator" : "#d8d8d8",
"commentline" : "#75715e", "commentline" : "#75715e",
"selection-foreground" : "#ffff00", "commentdoc" : "#75715e",
"selection-background" : "#a0a0ff", "commentdockeyword" : "#7b9a3c",
"margin-background" : "#757575", "number" : "#ae81ff",
"string" : "#e6db74",
"operator" : "#f92672",
"whitespace-background" : "#272822",
"whitespace-foreground" : "#f8f8f2",
"selection-foreground" : "#272822",
"selection-background" : "#f8f8f2",
"margin-background" : "#3e3d32",
"margin-foreground" : "#f8f8f2", "margin-foreground" : "#f8f8f2",
"matched-brace-background" : "#333", "matched-brace-background" : "#606060",
"matched-brace-foreground" : "#fff", "matched-brace-foreground" : "#f8f8f2",
"unmatched-brace-background" : "#333", "unmatched-brace-background" : "#dc322f",
"unmatched-brace-foreground" : "#fff", "unmatched-brace-foreground" : "#f8f8f2",
"error-marker" : "#ff0000", "error-marker" : "#ff0000",
"error-indicator" : "#80ffe0e0",
"error-indicator-outline" : "#ff000000",
"edge" : "#ffffff" "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", "name" : "Visual Studio",
"index" : 1400, "index" : 1400,
"paper" : "white", "paper" : "#ffffff",
"text" : "#111", "text" : "#101010",
"caret" : { "caret" : {
"width" : 2, "width" : 2,
"foreground" : "#000000", "foreground" : "#000000",
"line-background" : "#eee" "line-background" : "#eeeeee"
}, },
"colors" : { "colors" : {
"keyword1" : "blue", "keyword1" : "blue",
"keyword2" : "blue", "keyword2" : "blue",
"keyword3" : "#2B91AF", "keyword3" : "#2B91AF",
"comment" : "DarkGreen", "comment" : "DarkGreen",
"commentline" : "DarkGreen",
"commentdoc" : "#DarkGreen",
"commentdockeyword" : "#DarkGreen",
"number" : "DarkRed", "number" : "DarkRed",
"string" : "#A31515", "string" : "#A31515",
"operator" : "Blue", "operator" : "Blue",
"commentline" : "DarkGreen", "whitespace-background" : "#ffffff",
"whitespace-foreground" : "#101010",
"selection-foreground" : "black", "selection-foreground" : "black",
"selection-background" : "lightblue", "selection-background" : "lightblue",
"margin-background" : "white", "margin-background" : "white",
@ -24,8 +28,10 @@
"matched-brace-background" : "darkgrey", "matched-brace-background" : "darkgrey",
"matched-brace-foreground" : "black", "matched-brace-foreground" : "black",
"unmatched-brace-background" : "red", "unmatched-brace-background" : "red",
"unmatched-brace-foreground" : "#fff", "unmatched-brace-foreground" : "#ffffff",
"error-marker" : "#ff0000", "error-marker" : "#ff0000",
"error-indicator" : "#60ff0000",
"error-indicator-outline" : "#ff000000",
"edge" : "#ffffff" "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, "keyword1", textColor), QsciLexerCPP::Keyword);
lexer->setColor(readColor(colors, "keyword2", textColor), QsciLexerCPP::KeywordSet2); lexer->setColor(readColor(colors, "keyword2", textColor), QsciLexerCPP::KeywordSet2);
lexer->setColor(readColor(colors, "keyword3", textColor), QsciLexerCPP::GlobalClass); 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, "number", textColor), QsciLexerCPP::Number);
lexer->setColor(readColor(colors, "string", textColor), QsciLexerCPP::SingleQuotedString);
lexer->setColor(readColor(colors, "string", textColor), QsciLexerCPP::DoubleQuotedString); lexer->setColor(readColor(colors, "string", textColor), QsciLexerCPP::DoubleQuotedString);
lexer->setColor(readColor(colors, "operator", textColor), QsciLexerCPP::Operator); 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, "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"); 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->setCaretLineBackgroundColor(readColor(caret, "line-background", paperColor));
qsci->setMarkerBackgroundColor(readColor(colors, "error-marker", QColor(255, 0, 0, 100)), markerNumber); 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->setMarginsBackgroundColor(readColor(colors, "margin-background", paperColor));
qsci->setMarginsForegroundColor(readColor(colors, "margin-foreground", textColor)); qsci->setMarginsForegroundColor(readColor(colors, "margin-foreground", textColor));
qsci->setMatchedBraceBackgroundColor(readColor(colors, "matched-brace-background", paperColor)); qsci->setMatchedBraceBackgroundColor(readColor(colors, "matched-brace-background", paperColor));
@ -211,7 +219,11 @@ void ScintillaEditor::noColor()
qsci->setCaretWidth(2); qsci->setCaretWidth(2);
qsci->setCaretForegroundColor(Qt::black); qsci->setCaretForegroundColor(Qt::black);
qsci->setMarkerBackgroundColor(QColor(255, 0, 0, 100), markerNumber); 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->setCaretLineBackgroundColor(Qt::white);
qsci->setWhitespaceBackgroundColor(Qt::white);
qsci->setWhitespaceForegroundColor(Qt::black);
qsci->setMarginsBackgroundColor(Qt::white); qsci->setMarginsBackgroundColor(Qt::white);
qsci->setMarginsForegroundColor(Qt::black); qsci->setMarginsForegroundColor(Qt::black);
qsci->setSelectionForegroundColor(Qt::white); qsci->setSelectionForegroundColor(Qt::white);