OverwriteColors -> TitleOutline; use nitrogenclient::renderWindowBorder as a replacement for the ozone blue border.

svn path=/trunk/KDE/kdebase/workspace/; revision=1019902
This commit is contained in:
Hugo Pereira Da Costa 2009-09-04 19:00:04 +00:00
parent 06acf4cc37
commit f586bf760a

View file

@ -145,6 +145,8 @@ namespace Nitrogen
else palette.setCurrentColorGroup(QPalette::Inactive); else palette.setCurrentColorGroup(QPalette::Inactive);
client_.renderWindowBackground( &painter, rect(), this, palette ); client_.renderWindowBackground( &painter, rect(), this, palette );
if( client_.isActive() && client_.configuration().drawTitleOutline() )
{ client_.renderWindowBorder( &painter, rect(), this, palette ); }
// draw dividing line // draw dividing line
painter.setRenderHints(QPainter::Antialiasing); painter.setRenderHints(QPainter::Antialiasing);
@ -153,9 +155,7 @@ namespace Nitrogen
int w = frame.width()-2; int w = frame.width()-2;
const int titleHeight = client_.layoutMetric(KCommonDecoration::LM_TitleHeight); const int titleHeight = client_.layoutMetric(KCommonDecoration::LM_TitleHeight);
QColor color = ( client_.configuration().overwriteColors() ) ? QColor color = palette.window().color();
palette.window().color() :
client_.options()->color( KDecorationDefines::ColorTitleBar, client_.isActive());
QColor light = helper_.calcLightColor( color ); QColor light = helper_.calcLightColor( color );
QColor dark = helper_.calcDarkColor( color ); QColor dark = helper_.calcDarkColor( color );
@ -186,9 +186,7 @@ namespace Nitrogen
{ painter.translate( 0, -1 ); } { painter.translate( 0, -1 ); }
// button shape color // button shape color
QColor bt = client_.configuration().overwriteColors() ? QColor bt = palette.window().color();
palette.window().color():
client_.options()->color(KDecorationDefines::ColorTitleBar, client_.isActive());
// draw button shape // draw button shape
painter.drawPixmap(0, 0, helper_.windecoButton(bt, status_ == Nitrogen::Pressed, (21.0*client_.configuration().buttonSize())/22 ) ); painter.drawPixmap(0, 0, helper_.windecoButton(bt, status_ == Nitrogen::Pressed, (21.0*client_.configuration().buttonSize())/22 ) );