diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-10-10 07:39:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-10 07:39:50 +0200 |
commit | 9aa03382ea46f87f336dd8f55bcd17423d1632b5 (patch) | |
tree | c1665ae87bc5a1208aa353ad9df2a44185b8e84c /qtmips_gui/srceditor.cpp | |
parent | 7ec180881848027fbad6c7dd84b883c26643103f (diff) | |
parent | 2bfe22d935cb7d7c4f6c75f79ecfb568e75dc5d0 (diff) | |
download | qtmips-9aa03382ea46f87f336dd8f55bcd17423d1632b5.tar.gz qtmips-9aa03382ea46f87f336dd8f55bcd17423d1632b5.tar.bz2 qtmips-9aa03382ea46f87f336dd8f55bcd17423d1632b5.zip |
Merge pull request #3 from MadCatX/dark_themes_compat
Improve UI compatbility with dark color schemes
Diffstat (limited to 'qtmips_gui/srceditor.cpp')
-rw-r--r-- | qtmips_gui/srceditor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qtmips_gui/srceditor.cpp b/qtmips_gui/srceditor.cpp index 2d4a5ec..43e9075 100644 --- a/qtmips_gui/srceditor.cpp +++ b/qtmips_gui/srceditor.cpp @@ -35,6 +35,7 @@ #include <QFile> #include <QFileInfo> +#include <QPalette> #include <QTextDocumentWriter> #include <QTextCursor> #include <QTextBlock> @@ -52,6 +53,14 @@ void SrcEditor::setup_common() { setFont(font); tname = "Unknown"; highlighter = new HighlighterAsm(document()); + + QPalette p = palette(); + p.setColor(QPalette::Active, QPalette::Base, Qt::white); + p.setColor(QPalette::Inactive, QPalette::Base, Qt::white); + p.setColor(QPalette::Disabled, QPalette::Base, Qt::white); + setPalette(p); + + setTextColor(Qt::black); } SrcEditor::SrcEditor(QWidget *parent) : Super(parent) { |