diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp index f00f31fc2d2d9a7273899e3c7f52fc27eaa1f204..4632b52057673a68ba12cc4f6c83351049fd646c 100644 --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -152,6 +152,9 @@ namespace Breeze QColor Helper::buttonHoverOutlineColor( const QPalette& palette ) const { return KColorUtils::mix( buttonHoverColor( palette ), palette.color( QPalette::ButtonText ), 0.15 ); } + QColor Helper::checkBoxRadioButtonSymbolColor( const QPalette& palette ) const + { return KColorUtils::mix( palette.color( QPalette::Text ), palette.color( QPalette::Highlight ), 0.4 ); } + //____________________________________________________________________ QColor Helper::sidePanelOutlineColor( const QPalette& palette, bool hasFocus, qreal opacity, AnimationMode mode ) const { @@ -946,7 +949,11 @@ namespace Breeze painter->setPen(Qt::transparent); painter->setBrush(Qt::transparent); - auto checkPen = QPen( palette.text(), PenWidth::Frame * 2 ); + QBrush symbolColorBrush; + symbolColorBrush.setStyle( Qt::SolidPattern ); + symbolColorBrush.setColor( checkBoxRadioButtonSymbolColor( palette ) ); + + auto checkPen = QPen( symbolColorBrush, PenWidth::Frame * 2 ); checkPen.setJoinStyle(Qt::MiterJoin); switch (state) { @@ -957,7 +964,7 @@ namespace Breeze painter->drawPath( path ); break; case CheckPartial: - painter->setBrush( palette.text() ); + painter->setBrush( symbolColorBrush ); painter->drawRect(leftDot); painter->drawRect(centerDot); painter->drawRect(rightDot); @@ -1052,7 +1059,11 @@ namespace Breeze painter->restore(); } - painter->setBrush( palette.text() ); + // Combine palette.highlight() with palette.text() + QBrush symbolColorBrush; + symbolColorBrush.setStyle( Qt::SolidPattern ); + symbolColorBrush.setColor( checkBoxRadioButtonSymbolColor( palette ) ); + painter->setBrush( symbolColorBrush ); painter->setPen( Qt::NoPen ); QRectF markerRect; diff --git a/kstyle/breezehelper.h b/kstyle/breezehelper.h index 641b59e48dc5f753c52933f163ce231a9a47e868..065c53322c51f9cd014e64922dabbcc19b95b42b 100644 --- a/kstyle/breezehelper.h +++ b/kstyle/breezehelper.h @@ -106,6 +106,9 @@ namespace Breeze //* hover outline color, using animations QColor buttonHoverOutlineColor( const QPalette& ) const; + //* color used for the inner symbol of checkboxes and radssio buttons + QColor checkBoxRadioButtonSymbolColor( const QPalette& ) const; + //* side panel outline color, using animations QColor sidePanelOutlineColor( const QPalette&, bool hasFocus = false, qreal opacity = AnimationData::OpacityInvalid, AnimationMode = AnimationNone ) const;