diff options
author | Bjoern Breitmeyer <bjoern.breitmeyer@kdab.com> | 2012-05-10 14:43:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-10 22:56:25 +0200 |
commit | 9b9895de8da08776e586f20807d4698e5d9e5680 (patch) | |
tree | c76d3316e75c93a6c993f0fea148f496cd3b291a /src/plugins/platforms/windows/qwindowstheme.cpp | |
parent | 4e8c20e97e17881e2de20640f81c3998f024287d (diff) |
Fix for windows platform plugin to work with WINCE.
Made opengl optional.
Made Clipboard and Accessability optional.
Moved internal mime data into its on source file,
was implemented in the clipboard source
which is just strange.
Change-Id: I6ddf0c656533bd45e22e24492fc2254d15b7822f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstheme.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 63ed20eeef..0feb62dcea 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -45,6 +45,10 @@ #include "qwindowsintegration.h" #include "qt_windows.h" #include "qwindowsfontdatabase.h" +#ifdef Q_OS_WINCE +# include "qplatformfunctions_wince.h" +# include "winuser.h" +#endif #include <QtCore/QVariant> #include <QtCore/QCoreApplication> @@ -226,8 +230,13 @@ static inline QPalette menuPalette(const QPalette &systemPalette) result.setColor(QPalette::Active, QPalette::ButtonText, menuTextColor); result.setColor(QPalette::Disabled, QPalette::WindowText, disabled); result.setColor(QPalette::Disabled, QPalette::Text, disabled); +#ifndef Q_OS_WINCE result.setColor(QPalette::Disabled, QPalette::Highlight, getSysColor(isFlat ? COLOR_MENUHILIGHT : COLOR_HIGHLIGHT)); +#else + result.setColor(QPalette::Disabled, QPalette::Highlight, + getSysColor(COLOR_HIGHLIGHT)); +#endif result.setColor(QPalette::Disabled, QPalette::HighlightedText, disabled); result.setColor(QPalette::Disabled, QPalette::Button, result.color(QPalette::Active, QPalette::Button)); @@ -253,7 +262,11 @@ static inline QPalette *menuBarPalette(const QPalette &menuPalette) QPalette *result = 0; if (booleanSystemParametersInfo(SPI_GETFLATMENU, false)) { result = new QPalette(menuPalette); +#ifndef Q_OS_WINCE const QColor menubar(getSysColor(COLOR_MENUBAR)); +#else + const QColor menubar(getSysColor(COLOR_MENU)); +#endif result->setColor(QPalette::Active, QPalette::Button, menubar); result->setColor(QPalette::Disabled, QPalette::Button, menubar); result->setColor(QPalette::Inactive, QPalette::Button, menubar); @@ -323,10 +336,12 @@ QVariant QWindowsTheme::themeHint(ThemeHint hint) const return QVariant(iconThemeSearchPaths()); case StyleNames: return QVariant(styleNames()); +#ifndef Q_OS_WINCE case TextCursorWidth: return QVariant(int(dWordSystemParametersInfo(SPI_GETCARETWIDTH, 1u))); case DropShadow: return QVariant(booleanSystemParametersInfo(SPI_GETDROPSHADOW, false)); +#endif // !Q_OS_WINCE case MaximumScrollBarDragDistance: return QVariant(qRound(qreal(QWindowsContext::instance()->defaultDPI()) * 1.375)); case KeyboardScheme: @@ -368,6 +383,7 @@ void QWindowsTheme::clearFonts() void QWindowsTheme::refreshFonts() { +#ifndef Q_OS_WINCE // ALL THIS FUNCTIONALITY IS MISSING ON WINCE clearFonts(); if (!QGuiApplication::desktopSettingsAware()) return; @@ -398,6 +414,7 @@ void QWindowsTheme::refreshFonts() qDebug() << __FUNCTION__ << '\n' << " menuFont=" << menuFont << " messageBox=" << MessageBoxFont; +#endif // !Q_OS_WINCE } bool QWindowsTheme::usePlatformNativeDialog(DialogType type) const |