diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 0d9a466c93..fba536ff61 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -265,15 +265,25 @@ namespace Oxygen QRegion Client::calcMask( void ) const { - if( isMaximized() ) - { return widget()->rect(); } - + if( isMaximized() ) { return widget()->rect(); } QRect frame( widget()->rect().adjusted( layoutMetric( LM_OuterPaddingLeft ), layoutMetric( LM_OuterPaddingTop ), -layoutMetric( LM_OuterPaddingRight ), -layoutMetric( LM_OuterPaddingBottom ) ) ); - if( configuration().frameBorder() == Configuration::BorderNone && !isShade() ) return helper().roundedMask( frame, 1, 1, 1, 0 ); - else return helper().roundedMask( frame ); + if( configuration().frameBorder() == Configuration::BorderNone && !isShade() ) + { + + return compositingActive() ? + helper().decoRoundedMask( frame, 1, 1, 1, 0 ): + helper().roundedMask( frame, 1, 1, 1, 0 ); + + } else { + + return compositingActive() ? + helper().decoRoundedMask( frame ): + helper().roundedMask( frame ); + + } } @@ -1239,7 +1249,7 @@ namespace Oxygen void Client::updateWindowShape() { - if(isMaximized() || compositingActive() ) clearMask(); + if(isMaximized()) clearMask(); else setMask( calcMask() ); } diff --git a/clients/oxygen/oxygendecohelper.cpp b/clients/oxygen/oxygendecohelper.cpp index c7fc1074e1..d5879d96dc 100644 --- a/clients/oxygen/oxygendecohelper.cpp +++ b/clients/oxygen/oxygendecohelper.cpp @@ -144,4 +144,18 @@ namespace Oxygen return *pixmap; } + + //_______________________________________________________________________ + QRegion DecoHelper::decoRoundedMask( const QRect& r, int left, int right, int top, int bottom ) const + { + // get rect geometry + int x, y, w, h; + r.getRect(&x, &y, &w, &h); + + QRegion mask(x + 3*left, y + 0*top, w-3*(left+right), h-0*(top+bottom)); + mask += QRegion(x + 0*left, y + 3*top, w-0*(left+right), h-3*(top+bottom)); + mask += QRegion(x + 1*left, y + 1*top, w-1*(left+right), h-1*(top+bottom)); + + return mask; + } } diff --git a/clients/oxygen/oxygendecohelper.h b/clients/oxygen/oxygendecohelper.h index 51a90a0cb9..4fe07f2e3c 100644 --- a/clients/oxygen/oxygendecohelper.h +++ b/clients/oxygen/oxygendecohelper.h @@ -42,6 +42,8 @@ namespace Oxygen virtual QPixmap windecoButtonGlow(const QColor &color, int size = 21); //@} + virtual QRegion decoRoundedMask( const QRect&, int left = 1, int right = 1, int top = 1, int bottom = 1 ) const; + }; } diff --git a/clients/oxygen/oxygenshadowcache.cpp b/clients/oxygen/oxygenshadowcache.cpp index 8a6d2a33c5..c75fb32868 100644 --- a/clients/oxygen/oxygenshadowcache.cpp +++ b/clients/oxygen/oxygenshadowcache.cpp @@ -234,12 +234,13 @@ namespace Oxygen { // mid gradient - const qreal gradientSize = qMin( shadowSize, (shadowSize+fixedSize)/2 ); + const qreal gradientSize = qMin( shadowSize, (shadowSize+2*fixedSize)/3 ); const qreal hoffset = shadowConfiguration.horizontalOffset()*gradientSize/fixedSize; const qreal voffset = shadowConfiguration.verticalOffset()*gradientSize/fixedSize; const int nPoints = 7; const qreal x[7] = {0, 4.5, 5.5, 7.5, 8.5, 11.5, 14.5 }; + //const qreal values[7] = {0.55, 0.25, 0.20, 0.1, 0.06, 0.015, 0 }; const qreal values[7] = {0.55, 0.25, 0.20, 0.1, 0.06, 0.015, 0 }; QRadialGradient rg = QRadialGradient( size+8.0*hoffset, size+8.0*voffset, gradientSize ); QColor c = shadowConfiguration.midColor();