diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-03-14 13:04:30 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-03-15 07:50:30 +0000 |
commit | 63773fd5363e8954e298e775bba7478d612134ef (patch) | |
tree | 6b85eecb285a010f6ba488cc631cd8107c6cdb76 /src/quicktemplates2/qquickswitch.cpp | |
parent | 24750ce0624e8b6ec66d07d7d00877c4a928dfc3 (diff) |
QQuickTheme: add missing fonts and palettes
SpinBox, Switch, and Tumbler were previously not available in
QPlatformTheme, but now we have our own enums so we can add them.
Task-number: QTBUG-67062
Change-Id: Ie99a49b464fbbd25051181b75d721f537b8e3a68
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswitch.cpp')
-rw-r--r-- | src/quicktemplates2/qquickswitch.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickswitch.cpp b/src/quicktemplates2/qquickswitch.cpp index db71e423..5e3ccbc9 100644 --- a/src/quicktemplates2/qquickswitch.cpp +++ b/src/quicktemplates2/qquickswitch.cpp @@ -231,10 +231,14 @@ void QQuickSwitch::buttonChange(ButtonChange change) QQuickAbstractButton::buttonChange(change); } +QFont QQuickSwitch::defaultFont() const +{ + return QQuickTheme::themeFont(QQuickTheme::SwitchFont); +} + QPalette QQuickSwitch::defaultPalette() const { - // ### TODO: add QPlatformTheme::SwitchPalette - return QQuickTheme::themePalette(QQuickTheme::CheckBoxPalette); + return QQuickTheme::themePalette(QQuickTheme::SwitchPalette); } QT_END_NAMESPACE |