From 2e82c14abc4b22f93de96517626f35849f2ef7b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com>
Date: Fri, 20 Nov 2009 16:36:54 +0100
Subject: [PATCH] Fixed function argument widget text color in dark themes

By setting the window and button text colors to the tool tip text color,
since a tool tip background is drawn.

Task-number: QTCREATORBUG-322
---
 src/plugins/cpptools/cppcodecompletion.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp
index 4d7bdb69721..41373494ec1 100644
--- a/src/plugins/cpptools/cppcodecompletion.cpp
+++ b/src/plugins/cpptools/cppcodecompletion.cpp
@@ -87,6 +87,14 @@ public:
     {
         setFocusPolicy(Qt::NoFocus);
         setAttribute(Qt::WA_DeleteOnClose);
+
+        // Set the window and button text to the tooltip text color, since this
+        // widget draws the background as a tooltip.
+        QPalette p = palette();
+        const QColor toolTipTextColor = p.color(QPalette::Inactive, QPalette::ToolTipText);
+        p.setColor(QPalette::Inactive, QPalette::WindowText, toolTipTextColor);
+        p.setColor(QPalette::Inactive, QPalette::ButtonText, toolTipTextColor);
+        setPalette(p);
     }
 
 protected:
-- 
GitLab