diff options
Diffstat (limited to 'src/imports/controls/material/qquickmaterialstyle.cpp')
-rw-r--r-- | src/imports/controls/material/qquickmaterialstyle.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp index 76332c51..0e9f31df 100644 --- a/src/imports/controls/material/qquickmaterialstyle.cpp +++ b/src/imports/controls/material/qquickmaterialstyle.cpp @@ -706,6 +706,7 @@ void QQuickMaterialStyle::setBackground(const QVariant &var) m_background = background; propagateBackground(); emit backgroundChanged(); + emit paletteChanged(); } void QQuickMaterialStyle::inheritBackground(uint background, bool custom, bool has) @@ -854,7 +855,7 @@ QColor QQuickMaterialStyle::buttonColor(bool highlighted) const QColor color = Qt::transparent; - if (m_hasBackground) { + if (m_explicitBackground) { color = backgroundColor(shade); } else if (highlighted) { color = accentColor(shade); @@ -950,16 +951,11 @@ QColor QQuickMaterialStyle::scrollBarPressedColor() const return QColor::fromRgba(m_theme == Light ? 0x80000000 : 0x80FFFFFF); } -QColor QQuickMaterialStyle::drawerBackgroundColor() const -{ - return QColor::fromRgba(dividerColorLight); -} - QColor QQuickMaterialStyle::dialogColor() const { - if (!m_hasBackground) - return QColor::fromRgba(m_theme == Light ? dialogColorLight : dialogColorDark); - return backgroundColor(); + if (m_hasBackground) + return backgroundColor(); + return QColor::fromRgba(m_theme == Light ? dialogColorLight : dialogColorDark); } QColor QQuickMaterialStyle::backgroundDimColor() const @@ -974,9 +970,18 @@ QColor QQuickMaterialStyle::listHighlightColor() const QColor QQuickMaterialStyle::tooltipColor() const { + if (m_explicitBackground) + return backgroundColor(); return color(Grey, Shade700); } +QColor QQuickMaterialStyle::toolBarColor() const +{ + if (m_explicitBackground) + return backgroundColor(); + return primaryColor(); +} + QColor QQuickMaterialStyle::toolTextColor() const { if (m_hasForeground || m_customPrimary) |