From 9b9895de8da08776e586f20807d4698e5d9e5680 Mon Sep 17 00:00:00 2001 From: Bjoern Breitmeyer Date: Thu, 10 May 2012 14:43:26 +0200 Subject: 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 --- src/plugins/platforms/windows/qwindowstheme.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp') 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 #include @@ -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 -- cgit v1.2.3