diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstheme.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 9b6ae7c445..d3f67e9eaa 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -62,6 +62,7 @@ #include <QtCore/QTextStream> #include <QtCore/QSysInfo> #include <QtCore/QCache> +#include <QtGui/QColor> #include <QtGui/QPalette> #include <QtGui/QGuiApplication> #include <QtGui/QPainter> @@ -77,6 +78,16 @@ QT_BEGIN_NAMESPACE +static inline COLORREF qColorToCOLORREF(const QColor &color) +{ + return RGB(color.red(), color.green(), color.blue()); +} + +static inline QColor COLORREFToQColor(COLORREF cr) +{ + return QColor(GetRValue(cr), GetGValue(cr), GetBValue(cr)); +} + static inline QTextStream& operator<<(QTextStream &str, const QColor &c) { str.setIntegerBase(16); |