diff options
Diffstat (limited to 'src/widgets/kernel/qwhatsthis.cpp')
-rw-r--r-- | src/widgets/kernel/qwhatsthis.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 7a53dc3415..e1a1cd05ef 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -43,6 +43,7 @@ #ifndef QT_NO_WHATSTHIS #include "qpointer.h" #include "qapplication.h" +#include <private/qguiapplication_p.h> #include "qdesktopwidget.h" #include "qevent.h" #include "qpixmap.h" @@ -59,12 +60,6 @@ #ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" #endif -#if defined(Q_WS_WIN) -#include "qt_windows.h" -#ifndef SPI_GETDROPSHADOW -#define SPI_GETDROPSHADOW 0x1024 -#endif -#endif QT_BEGIN_NAMESPACE @@ -221,15 +216,9 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor + Qt::TextWordWrap + Qt::TextExpandTabs, text); } -#if defined(Q_WS_WIN) - if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP - && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) - { - BOOL shadow; - SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0); - shadowWidth = shadow ? 0 : 6; - } -#endif + shadowWidth = + QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::DropShadow).toBool() ? + 0 : 6; resize(r.width() + 2*hMargin + shadowWidth, r.height() + 2*vMargin + shadowWidth); } |