Added cache to clip away center region of shadows, in order no to overlap with the decoration painting.

Changed mask for the decoration painting. 
This is needed for proper implementation of decoration translucency.

svn path=/trunk/KDE/kdebase/workspace/; revision=1151956
This commit is contained in:
Hugo Pereira Da Costa 2010-07-20 01:39:15 +00:00
parent d732e2f56c
commit 289e6f5f74
2 changed files with 6 additions and 3 deletions

View file

@ -1355,7 +1355,6 @@ namespace Oxygen
if( configuration().useOxygenShadows() && glowIsAnimated() && !isForcedActive() )
{
//tileSet = shadowCache().tileSet( this, glowIntensity() );
tileSet = shadowCache().tileSet( background, key, glowIntensity() );
} else tileSet = shadowCache().tileSet( background, key );
@ -1387,7 +1386,7 @@ namespace Oxygen
// disable bottom corners when border frame is too small and window is not shaded
if( configuration().frameBorder() == Configuration::BorderNone && !isShade() ) bottom = 0;
QRegion mask( helper().roundedRegion( frame, left, right, top, bottom ) );
QRegion mask( helper().roundedMask( frame, left, right, top, bottom ) );
// in no-border configuration, an extra pixel is added to the mask
// in order to get the corners color right in case of title highlighting.

View file

@ -306,11 +306,15 @@ namespace Oxygen
lg.setColorAt(0.51, helper().backgroundBottomColor(color) );
lg.setColorAt(1.0, helper().backgroundBottomColor(color) );
// draw ellipse.
p.setBrush( lg );
p.drawEllipse( QRectF( size-4, size-4, 8, 8 ) );
// mask
p.setCompositionMode(QPainter::CompositionMode_DestinationOut);
p.setBrush( Qt::black );
p.drawEllipse( QRectF( size-3, size-3, 6, 6 ) );
p.end();
return shadow;