From 92fb0247285c9ccf50935ce0aa7983ae4ac5b7c8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 16 Apr 2014 15:46:08 +0200 Subject: Windows: Add missing colors to tooltip palette. Task-number: QTBUG-38183 Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f Reviewed-by: Oliver Wolff (cherry picked from qtbase/9fc0c5466238eb8f43d2736d298ac36c65da529e) --- src/gui/kernel/qapplication_win.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 9bc6cfc..276d73a 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -586,6 +586,7 @@ static void qt_set_windows_color_resources() QPalette tiplabel(pal); tiplabel.setColor(QPalette::All, QPalette::Button, ttip); tiplabel.setColor(QPalette::All, QPalette::Window, ttip); + tiplabel.setColor(QPalette::All, QPalette::ToolTipBase, ttip); tiplabel.setColor(QPalette::All, QPalette::Text, ttipText); tiplabel.setColor(QPalette::All, QPalette::WindowText, ttipText); tiplabel.setColor(QPalette::All, QPalette::ButtonText, ttipText); @@ -594,12 +595,15 @@ static void qt_set_windows_color_resources() tiplabel.setColor(QPalette::All, QPalette::Text, ttipText); tiplabel.setColor(QPalette::All, QPalette::WindowText, ttipText); tiplabel.setColor(QPalette::All, QPalette::ButtonText, ttipText); + tiplabel.setColor(QPalette::All, QPalette::ToolTipText, ttipText); const QColor fg = tiplabel.foreground().color(), btn = tiplabel.button().color(); QColor disabled((fg.red()+btn.red())/2,(fg.green()+btn.green())/2, (fg.blue()+btn.blue())/2); tiplabel.setColor(QPalette::Disabled, QPalette::WindowText, disabled); + tiplabel.setColor(QPalette::Disabled, QPalette::ToolTipText, disabled); tiplabel.setColor(QPalette::Disabled, QPalette::Text, disabled); tiplabel.setColor(QPalette::Disabled, QPalette::Base, Qt::white); + tiplabel.setColor(QPalette::Disabled, QPalette::ToolTipBase, Qt::white); tiplabel.setColor(QPalette::Disabled, QPalette::BrightText, Qt::white); QToolTip::setPalette(tiplabel); #endif //QT_NO_TOOLTIP -- cgit v0.12