From 5f8081a7e9747a5f3f04fd8fe6a19ac6336cc9d2 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Fri, 28 Nov 2008 04:06:49 +0000 Subject: [PATCH] Sync r889943 from Oxygen. svn path=/trunk/KDE/kdebase/workspace/; revision=889945 --- clients/ozone/oxygen.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/clients/ozone/oxygen.cpp b/clients/ozone/oxygen.cpp index 20963de2d6..63610bb415 100644 --- a/clients/ozone/oxygen.cpp +++ b/clients/ozone/oxygen.cpp @@ -199,7 +199,6 @@ QList< QList > OxygenFactory::shadowTextures() shadow->fill( Qt::transparent ); QRadialGradient rg( size, size, size ); QColor c = color; - c.setAlpha( 0 ); rg.setColorAt( 4/size, c ); c.setAlpha( 255 ); rg.setColorAt( 4.4/size, c ); c = glow; c.setAlpha( 220 ); rg.setColorAt( 4.5/size, c ); @@ -214,7 +213,6 @@ QList< QList > OxygenFactory::shadowTextures() rg = QRadialGradient( size, size, size ); c = color; - c.setAlpha( 0 ); rg.setColorAt( 4/size, c ); c.setAlpha( 255 ); rg.setColorAt( 4.4/size, c ); c = glow2; c.setAlpha( 0.58*255 ); rg.setColorAt( 4.5/size, c ); @@ -237,6 +235,14 @@ QList< QList > OxygenFactory::shadowTextures() p.setPen(QPen(lg, 0.8)); p.drawEllipse(QRectF(size-4, size-4, 8, 8)); + // cut out the part of the texture that is under the window + p.setCompositionMode( QPainter::CompositionMode_DestinationOut ); + p.setBrush( QColor( 0, 0, 0, 255 )); + p.setPen( Qt::NoPen ); + p.drawEllipse(QRectF(size-3, size-3, 6, 6)); + p.drawRect(QRectF(size-3, size-1, 6, 2)); + p.drawRect(QRectF(size-1, size-3, 2, 6)); + p.end(); int w = shadow->width() / 2; @@ -328,10 +334,12 @@ QList< QList > OxygenFactory::shadowTextures() p.drawEllipse(QRectF(size-4, size-4, 8, 8)); // cut out the part of the texture that is under the window - p.setCompositionMode( QPainter::CompositionMode_Xor ); + p.setCompositionMode( QPainter::CompositionMode_DestinationOut ); p.setBrush( QColor( 0, 0, 0, 255 )); p.setPen( Qt::NoPen ); - p.drawEllipse(QRectF(size-4, size-4, 8, 8)); + p.drawEllipse(QRectF(size-3, size-3, 6, 6)); + p.drawRect(QRectF(size-3, size-1, 6, 2)); + p.drawRect(QRectF(size-1, size-3, 2, 6)); p.end();