aboutsummaryrefslogtreecommitdiffstats
path: root/community/cutecom/follow-system-colors.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/cutecom/follow-system-colors.patch')
-rw-r--r--community/cutecom/follow-system-colors.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/community/cutecom/follow-system-colors.patch b/community/cutecom/follow-system-colors.patch
new file mode 100644
index 00000000000..1575367de3d
--- /dev/null
+++ b/community/cutecom/follow-system-colors.patch
@@ -0,0 +1,35 @@
+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
+