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 c168aec824
commit 5bb041deaa
4 changed files with 18 additions and 9 deletions

View File

@@ -23,6 +23,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QApplication>
# include <QKeyEvent>
# include <QPainter>
# include <QRegularExpression>
@@ -197,7 +198,7 @@ struct TextEditorP
QMap<QString, QColor> colormap; // Color map
TextEditorP()
{
colormap[QLatin1String("Text")] = Qt::black;
colormap[QLatin1String("Text")] = qApp->palette().windowText().color();
colormap[QLatin1String("Bookmark")] = Qt::cyan;
colormap[QLatin1String("Breakpoint")] = Qt::red;
colormap[QLatin1String("Keyword")] = Qt::blue;