|
|
|
|
@ -301,7 +301,9 @@ namespace Breeze |
|
|
|
|
addEventFilter( widget ); |
|
|
|
|
|
|
|
|
|
// force KPageListView flat
|
|
|
|
|
if( widget->inherits( "KDEPrivate::KPageListView" ) || widget->property( PropertyNames::sidePanelView ).toBool() ) |
|
|
|
|
if( |
|
|
|
|
!StyleConfigData::sidePanelDrawFrame() && |
|
|
|
|
( widget->inherits( "KDEPrivate::KPageListView" ) || widget->property( PropertyNames::sidePanelView ).toBool() ) ) |
|
|
|
|
{ |
|
|
|
|
scrollArea->setFrameStyle( QFrame::NoFrame ); |
|
|
|
|
scrollArea->setBackgroundRole( QPalette::Window ); |
|
|
|
|
@ -313,6 +315,7 @@ namespace Breeze |
|
|
|
|
{ |
|
|
|
|
viewport->setBackgroundRole( QPalette::Window ); |
|
|
|
|
viewport->setForegroundRole( QPalette::WindowText ); |
|
|
|
|
viewport->setAutoFillBackground( false ); |
|
|
|
|
viewport->setPalette( _helper->sideViewPalette( viewport->palette() ) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -3170,6 +3173,7 @@ namespace Breeze |
|
|
|
|
const bool hasCustomBackground = viewItemOption->backgroundBrush.style() != Qt::NoBrush && !( state & State_Selected ); |
|
|
|
|
const bool hasSolidBackground = !hasCustomBackground || viewItemOption->backgroundBrush.style() == Qt::SolidPattern; |
|
|
|
|
const bool hasAlternateBackground( viewItemOption->features & QStyleOptionViewItemV2::Alternate ); |
|
|
|
|
const bool isSidePanel( !StyleConfigData::sidePanelDrawFrame() && widget && widget->property( PropertyNames::sidePanelView ).toBool() ); |
|
|
|
|
|
|
|
|
|
// do nothing if no background is to be rendered
|
|
|
|
|
if( !( mouseOver || selected || hasCustomBackground || hasAlternateBackground ) ) |
|
|
|
|
@ -3177,7 +3181,7 @@ namespace Breeze |
|
|
|
|
|
|
|
|
|
// define color group
|
|
|
|
|
QPalette::ColorGroup colorGroup; |
|
|
|
|
if( enabled ) colorGroup = active ? QPalette::Active : QPalette::Inactive; |
|
|
|
|
if( enabled ) colorGroup = ( active || isSidePanel ) ? QPalette::Active : QPalette::Inactive; |
|
|
|
|
else colorGroup = QPalette::Disabled; |
|
|
|
|
|
|
|
|
|
// render alternate background
|
|
|
|
|
@ -3241,7 +3245,7 @@ namespace Breeze |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const bool isSidePanel( widget && widget->property( PropertyNames::sidePanelView ).toBool() ); |
|
|
|
|
// adjust rect
|
|
|
|
|
if( isSidePanel ) |
|
|
|
|
{ |
|
|
|
|
rect.setWidth( Metrics::SidePanel_ItemMarginWidth ); |
|
|
|
|
|