From 5f28284a0f0b07df73d3e7e1db18819dd89b19cb Mon Sep 17 00:00:00 2001 From: Jan Blackquill Date: Mon, 10 May 2021 17:43:08 -0400 Subject: [PATCH] Make toolbuttons outlined BUG: 420498 --- kstyle/breezehelper.cpp | 11 ++++------- kstyle/breezestyle.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp index ac93019a..d3faa4fc 100644 --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -709,21 +709,18 @@ namespace Breeze painter->setRenderHints( QPainter::Antialiasing ); const QRectF baseRect( rect.adjusted( 1, 1, -1, -1 ) ); + const qreal radius( frameRadius( PenWidth::Frame ) ); if( sunken ) { - const qreal radius( frameRadius( PenWidth::NoPen ) ); - - painter->setPen( Qt::NoPen ); - painter->setBrush( color ); + painter->setPen( color ); + painter->setBrush( alphaColor(color, 0.35) ); - painter->drawRoundedRect( baseRect, radius, radius ); + painter->drawRoundedRect( strokedRect ( baseRect ), radius, radius ); } else { - const qreal radius( frameRadius( PenWidth::Frame ) ); - painter->setPen( color ); painter->setBrush( Qt::NoBrush ); const QRectF outlineRect( strokedRect( baseRect ) ); diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index 629d00e3..8b82919d 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -6140,6 +6140,9 @@ namespace Breeze copy.rect = menuRect; drawPrimitive( PE_IndicatorButtonDropDown, ©, painter, widget ); + copy.state &= ~State_MouseOver; + copy.state &= ~State_Sunken; + copy.state &= ~State_On; if( sunken && !flat ) copy.rect.translate( 1, 1 ); drawPrimitive( PE_IndicatorArrowDown, ©, painter, widget ); @@ -6148,6 +6151,9 @@ namespace Breeze { copy.rect = menuRect; + copy.state &= ~State_MouseOver; + copy.state &= ~State_Sunken; + copy.state &= ~State_On; if( sunken && !flat ) copy.rect.translate( 1, 1 ); if( menuStyle == BreezePrivate::ToolButtonMenuArrowStyle::InlineSmall )