Gui: use default app text color for Python code instuctions highlighting

This allows to deal with OS native dark themes
 In such cases, Python instructions were black on a dark background
This commit is contained in:
0penBrain
2022-10-03 17:52:45 +02:00
committed by Chris Hennes
parent 4f17fa7387
commit dc9e4db491
4 changed files with 18 additions and 9 deletions

View File

@@ -22,6 +22,9 @@
#include "PreCompiled.h"
#include <QApplication>
#include <QPalette>
#include "SyntaxHighlighter.h"
@@ -33,11 +36,16 @@ class SyntaxHighlighterP
public:
SyntaxHighlighterP()
{
cNormalText.setRgb(0, 0, 0); cComment.setRgb(0, 170, 0);
cBlockcomment.setRgb(160, 160, 164); cLiteral.setRgb(255, 0, 0);
cNumber.setRgb(0, 0, 255); cOperator.setRgb(160, 160, 164);
cKeyword.setRgb(0, 0, 255); cClassName.setRgb(255, 170, 0);
cDefineName.setRgb(255, 170, 0); cOutput.setRgb(170, 170, 127);
cNormalText = qApp->palette().windowText().color();
cComment.setRgb(0, 170, 0);
cBlockcomment.setRgb(160, 160, 164);
cLiteral.setRgb(255, 0, 0);
cNumber.setRgb(0, 0, 255);
cOperator.setRgb(160, 160, 164);
cKeyword.setRgb(0, 0, 255);
cClassName.setRgb(255, 170, 0);
cDefineName.setRgb(255, 170, 0);
cOutput.setRgb(170, 170, 127);
cError.setRgb(255, 0, 0);
}