winrt: prefer fusion over windows theme
As on other mobile platforms, fusion should be preferred as the default theme instead of the desktop windows one. The styleHints from QPlatformIntegration are adapted on top of fusion then. Task-number: QTBUG-40667 Change-Id: I60836b4a199b29e63c400c2ed9bbbab7d3add902 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
7a7b745917
commit
2d3be6a989
@ -369,6 +369,17 @@ QVariant QWinRTTheme::styleHint(QPlatformIntegration::StyleHint hint)
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant QWinRTTheme::themeHint(ThemeHint hint) const
|
||||
{
|
||||
qCDebug(lcQpaTheme) << __FUNCTION__ << hint;
|
||||
switch (hint) {
|
||||
case StyleNames:
|
||||
return QStringList() << QStringLiteral("fusion") << QStringLiteral("windows");
|
||||
default:
|
||||
return QPlatformTheme::themeHint(hint);
|
||||
}
|
||||
}
|
||||
|
||||
const QPalette *QWinRTTheme::palette(Palette type) const
|
||||
{
|
||||
Q_D(const QWinRTTheme);
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
const QPalette *palette(Palette type = SystemPalette) const Q_DECL_OVERRIDE;
|
||||
|
||||
static QVariant styleHint(QPlatformIntegration::StyleHint hint);
|
||||
|
||||
QVariant themeHint(ThemeHint hint) const override;
|
||||
private:
|
||||
QScopedPointer<QWinRTThemePrivate> d_ptr;
|
||||
Q_DECLARE_PRIVATE(QWinRTTheme)
|
||||
|
Loading…
x
Reference in New Issue
Block a user