diff options
-rw-r--r-- | src/controls/Private/qquickstyleitem.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp index 21de9819..5b7e6728 100644 --- a/src/controls/Private/qquickstyleitem.cpp +++ b/src/controls/Private/qquickstyleitem.cpp @@ -1534,6 +1534,15 @@ void QQuickStyleItem::paint(QPainter *painter) painter->setPen(pen); } break; case SpinBox: +#ifdef Q_OS_MAC + // macstyle depends on the embedded qlineedit to fill the editfield background + if (style() == "mac") { + QRect editRect = qApp->style()->subControlRect(QStyle::CC_SpinBox, + qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), + QStyle::SC_SpinBoxEditField); + painter->fillRect(editRect.adjusted(-1, -1, 1, 1), m_styleoption->palette.base()); + } +#endif qApp->style()->drawComplexControl(QStyle::CC_SpinBox, qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), painter); |