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
This commit is contained in:
Thorbjørn Lindeijer
2009-11-20 16:36:54 +01:00
parent ad4c227ca4
commit 2e82c14abc

View File

@@ -87,6 +87,14 @@ public:
{ {
setFocusPolicy(Qt::NoFocus); setFocusPolicy(Qt::NoFocus);
setAttribute(Qt::WA_DeleteOnClose); 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: protected: