restored default selection for flat side panel

(custom one does not work with scrollbars)
wilder-pre-rebase
Hugo Pereira Da Costa 12 years ago
parent 8846610e01
commit 14835339a3
  1. 4
      kstyle/breezehelper.cpp
  2. 12
      kstyle/breezestyle.cpp

@ -121,10 +121,6 @@ namespace Breeze
{
QPalette copy( palette );
// alter highlighted text color
copy.setColor( QPalette::Active, QPalette::HighlightedText, palette.color( QPalette::Active, QPalette::Highlight ) );
copy.setColor( QPalette::Inactive, QPalette::HighlightedText, palette.color( QPalette::Active, QPalette::Highlight ) );
// alter default text color
copy.setColor( QPalette::Disabled, QPalette::Text, palette.color( QPalette::Disabled, QPalette::WindowText ) );
copy.setColor( QPalette::Active, QPalette::Text, palette.color( QPalette::Active, QPalette::WindowText ) );

@ -3186,7 +3186,6 @@ 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 ) )
@ -3194,7 +3193,7 @@ namespace Breeze
// define color group
QPalette::ColorGroup colorGroup;
if( enabled ) colorGroup = ( active || isSidePanel ) ? QPalette::Active : QPalette::Inactive;
if( enabled ) colorGroup = active ? QPalette::Active : QPalette::Inactive;
else colorGroup = QPalette::Disabled;
// render alternate background
@ -3237,7 +3236,7 @@ namespace Breeze
// get selection path
Corners corners;
const bool hasSingleSelection( abstractItemView && abstractItemView->selectionMode() == QAbstractItemView::SingleSelection );
if( hasSingleSelection && !isSidePanel )
if( hasSingleSelection )
{
// round relevant corners
@ -3258,13 +3257,6 @@ namespace Breeze
}
// adjust rect
if( isSidePanel )
{
rect.setLeft( rect.right() - Metrics::SidePanel_ItemMarginWidth + 1 );
rect = visualRect( option, rect );
}
// render
_helper->renderSelection( painter, rect, color, corners );

Loading…
Cancel
Save