From 60e95cc624d088422581be1df34e5dd8e7aa9fba Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 9 Sep 2009 16:28:01 +0000 Subject: [PATCH] Used nitrogenclient::renderWindowBackground in place of helper::renderWindowBackground everywhere to honor 'solid color' in title outline. Removed useless white spaces svn path=/trunk/KDE/kdebase/workspace/; revision=1021600 --- clients/nitrogen/nitrogenclient.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/clients/nitrogen/nitrogenclient.cpp b/clients/nitrogen/nitrogenclient.cpp index 151a6cedb5..5f08f16545 100644 --- a/clients/nitrogen/nitrogenclient.cpp +++ b/clients/nitrogen/nitrogenclient.cpp @@ -172,13 +172,13 @@ namespace Nitrogen border = qMax(frameBorder, 4); } else if( configuration().frameBorder() == NitrogenConfiguration::BorderNone && isPreview() && !compositingActive() ) { - + border = 1; } else if( frameBorder < NitrogenConfiguration::BorderTiny ) { - + border = 0; - + } else { border = frameBorder; @@ -451,11 +451,7 @@ namespace Nitrogen int height = HFRAMESIZE; QRect rect( r.topLeft()-position, QSize( r.width(), height ) ); helper().slab( palette.color( widget->backgroundRole() ), 0, shadow_size )->render( rect.adjusted(-shadow_size-1, 0, shadow_size+1, 2 ), painter, TileSet::Bottom ); - - int offset = layoutMetric( LM_OuterPaddingTop ); - int gradient_height = 64 + configuration().buttonSize() - 22; - const QWidget* window( isPreview() ? NitrogenClient::widget() : widget->window() ); - helper().renderWindowBackground(painter, rect, widget, window, palette, offset, gradient_height ); + renderWindowBackground(painter, rect, widget, palette ); } @@ -511,11 +507,8 @@ namespace Nitrogen // center { - int offset = layoutMetric( LM_OuterPaddingTop ); - int height = 64 + configuration().buttonSize() - 22; int voffset = isMaximized() ? 0:HFRAMESIZE; - const QWidget* window( isPreview() ? widget() : widget()->window() ); - helper().renderWindowBackground(painter, rect.adjusted( 4, voffset, -4, -4 ), widget(), window, palette, offset, height ); + renderWindowBackground(painter, rect.adjusted( 4, voffset, -4, -4 ), widget(), palette ); } }