summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwhatsthis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwhatsthis.cpp')
-rw-r--r--src/gui/kernel/qwhatsthis.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qwhatsthis.cpp b/src/gui/kernel/qwhatsthis.cpp
index 067c7839f4..62b5863c37 100644
--- a/src/gui/kernel/qwhatsthis.cpp
+++ b/src/gui/kernel/qwhatsthis.cpp
@@ -226,7 +226,9 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
text);
}
#if defined(Q_WS_WIN)
- if ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_2000) {
+ if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
+ && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ {
BOOL shadow;
SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
shadowWidth = shadow ? 0 : 6;
@@ -302,7 +304,9 @@ void QWhatsThat::paintEvent(QPaintEvent*)
{
bool drawShadow = true;
#if defined(Q_WS_WIN)
- if ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_2000) {
+ if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
+ && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+ {
BOOL shadow;
SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
drawShadow = !shadow;
@@ -347,6 +351,7 @@ void QWhatsThat::paintEvent(QPaintEvent*)
rect.translate(-r.x(), -r.y());
p.setClipRect(rect);
QAbstractTextDocumentLayout::PaintContext context;
+ context.palette.setBrush(QPalette::Text, context.palette.toolTipText());
doc->documentLayout()->draw(&p, context);
}
else