From 1cab7b5d3e8fa3c64f2b8d58ef7c60127b68dd46 Mon Sep 17 00:00:00 2001
From: genelocated <genelocated@foxmail.com>
Date: Thu, 16 Jan 2020 22:25:26 +0800
Subject: [PATCH] Follow system color settings in DataDisplay

---
 datadisplay.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/datadisplay.cpp b/datadisplay.cpp
index 2595057..da54e5d 100644
--- a/datadisplay.cpp
+++ b/datadisplay.cpp
@@ -373,7 +373,8 @@ void DataDisplay::setupTextFormats()
 
     QTextCursor cursor = m_dataDisplay->textCursor();
     QTextCharFormat format = cursor.charFormat();
-    QColor col = QColor(Qt::black);
+    QPalette palette = QApplication::palette();
+    QColor col = palette.color(QPalette::WindowText);
     format.setForeground(col);
     QFont font;
     font.setFamily(font.defaultFamily());
@@ -386,7 +387,7 @@ void DataDisplay::setupTextFormats()
     format.setForeground(col);
     m_dataDisplay->setTimeFormat(new QTextCharFormat(format));
 
-    col = QColor(Qt::black);
+    col = palette.color(QPalette::WindowText);
     format.setForeground(col);
     font = QFont("Monospace");
     font.setStyleHint(QFont::Courier);
-- 
GitLab

