diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp index cc8864b9..3d1c2be3 100644 --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -129,6 +129,10 @@ namespace Breeze QColor Helper::frameBackgroundColor( const QPalette& palette, QPalette::ColorGroup role ) const { return KColorUtils::mix( palette.color( role, QPalette::Window ), palette.color( role, QPalette::Base ), 0.3 ); } + //____________________________________________________________________ + QColor Helper::sidePanelBackgroundColor( const QPalette& palette, QPalette::ColorGroup role ) const + { return KColorUtils::mix( palette.color( role, QPalette::Window ), palette.color( role, QPalette::Base ), 0.6 ); } + //____________________________________________________________________ QPalette Helper::framePalette( const QPalette& palette ) const { @@ -143,11 +147,14 @@ namespace Breeze QPalette Helper::sideViewPalette( const QPalette& palette ) const { QPalette copy( palette ); - - // 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 ) ); - copy.setColor( QPalette::Inactive, QPalette::Text, palette.color( QPalette::Inactive, QPalette::WindowText ) ); + copy.setColor( QPalette::Disabled, QPalette::Base, sidePanelBackgroundColor( palette, QPalette::Disabled ) ); + copy.setColor( QPalette::Active, QPalette::Base, sidePanelBackgroundColor( palette, QPalette::Active ) ); + copy.setColor( QPalette::Inactive, QPalette::Base, sidePanelBackgroundColor( palette, QPalette::Inactive ) ); + +// // 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 ) ); +// copy.setColor( QPalette::Inactive, QPalette::Text, palette.color( QPalette::Inactive, QPalette::WindowText ) ); return copy; diff --git a/kstyle/breezehelper.h b/kstyle/breezehelper.h index f5c043b4..32148ae7 100644 --- a/kstyle/breezehelper.h +++ b/kstyle/breezehelper.h @@ -110,6 +110,9 @@ namespace Breeze //* frame background color QColor frameBackgroundColor( const QPalette&, QPalette::ColorGroup ) const; + //* frame background color + QColor sidePanelBackgroundColor( const QPalette&, QPalette::ColorGroup ) const; + //* return altered palette suitable for tinted frames QPalette framePalette( const QPalette& ) const; diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index 9c03e1fb..19760d45 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -296,16 +296,16 @@ namespace Breeze { // force flat // scrollArea->setFrameStyle( QFrame::NoFrame ); - scrollArea->setBackgroundRole( QPalette::Window ); - scrollArea->setForegroundRole( QPalette::WindowText ); + // scrollArea->setBackgroundRole( QPalette::Window ); + // scrollArea->setForegroundRole( QPalette::WindowText ); scrollArea->setPalette( _helper->sideViewPalette( scrollArea->palette() ) ); scrollArea->setProperty( PropertyNames::sidePanelView, true ); if( QWidget *viewport = scrollArea->viewport() ) { - viewport->setBackgroundRole( QPalette::Window ); - viewport->setForegroundRole( QPalette::WindowText ); - viewport->setAutoFillBackground( false ); + // viewport->setBackgroundRole( QPalette::Window ); + // viewport->setForegroundRole( QPalette::WindowText ); + // viewport->setAutoFillBackground( false ); viewport->setPalette( _helper->sideViewPalette( viewport->palette() ) ); }