Skip to content

Commit

Permalink
winrt: prefer fusion over windows theme
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mauricek committed Oct 6, 2016
1 parent 7a7b745 commit 2d3be6a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/plugins/platforms/winrt/qwinrttheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/platforms/winrt/qwinrttheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class QWinRTTheme : public QPlatformTheme
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)
Expand Down

0 comments on commit 2d3be6a

Please sign in to comment.