mirror of https://github.com/vitalif/openscad
added Monokai theme color scheme in scintilla editor
parent
a70c4eb8e2
commit
fbceb0bdd8
|
@ -253,6 +253,11 @@
|
|||
<property name="text">
|
||||
<string>For Dark Background</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Monokai</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
|
|
|
@ -113,6 +113,25 @@ void ScintillaEditor::forDarkBackground()
|
|||
qsci->setMarginsForegroundColor(QColor("#fff"));
|
||||
|
||||
}
|
||||
|
||||
void ScintillaEditor::Monokai()
|
||||
{
|
||||
lexer->setPaper("#272822");
|
||||
lexer->setColor(QColor("#f8f8f2")); // -> Style: Default text
|
||||
lexer->setColor(QColor("#66c3b3"), QsciLexerCPP::Keyword); // -> Style: Keyword
|
||||
lexer->setColor(QColor("#79abff"), QsciLexerCPP::KeywordSet2); // -> Style: KeywordSet2
|
||||
lexer->setColor(QColor("#ccdf32"), QsciLexerCPP::CommentDocKeyword); // -> used in comments only like /*! \cube */
|
||||
lexer->setColor(QColor("#ffffff"), QsciLexerCPP::GlobalClass); // -> Style: GlobalClass
|
||||
lexer->setColor(QColor("#d8d8d8"), QsciLexerCPP::Operator);
|
||||
lexer->setColor(QColor("#e6db74"), QsciLexerCPP::DoubleQuotedString);
|
||||
lexer->setColor(QColor("#75715e"), QsciLexerCPP::CommentLine);
|
||||
lexer->setColor(QColor("#7fb347"), QsciLexerCPP::Number);
|
||||
qsci->setMarkerBackgroundColor(QColor(255, 0, 0, 100), markerNumber);
|
||||
qsci->setCaretLineBackgroundColor(QColor("#3e3d32"));
|
||||
qsci->setMarginsBackgroundColor(QColor("#757575"));
|
||||
qsci->setMarginsForegroundColor(QColor("#f8f8f2"));
|
||||
}
|
||||
|
||||
void ScintillaEditor::noColor()
|
||||
{
|
||||
lexer->setPaper(Qt::white);
|
||||
|
@ -132,6 +151,10 @@ void ScintillaEditor::setHighlightScheme(const QString &name)
|
|||
{
|
||||
forDarkBackground();
|
||||
}
|
||||
else if(name == "Monokai")
|
||||
{
|
||||
Monokai();
|
||||
}
|
||||
else if(name == "Off")
|
||||
{
|
||||
noColor();
|
||||
|
|
|
@ -20,6 +20,7 @@ public:
|
|||
void initLexer();
|
||||
void forLightBackground();
|
||||
void forDarkBackground();
|
||||
void Monokai();
|
||||
void noColor();
|
||||
|
||||
public slots:
|
||||
|
|
Loading…
Reference in New Issue