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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user