[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdebase/runtime/kstyles/oxygen
From:       Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date:       2010-03-29 16:05:30
Message-ID: 20100329160530.C3CBBAC883 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1108704 by hpereiradacosta:

Backport: r1108701
Fixed painter CompositionMode when rendering rounded corners for menus, detached \
dockpanels, detached  toolbars and combobox containers. This prevents the corners to \
appear "flat" in some cases, notably when  a stylesheet is given to the application.


 M  +11 -3     oxygen.cpp  


--- branches/KDE/4.4/kdebase/runtime/kstyles/oxygen/oxygen.cpp #1108703:1108704
@@ -5480,7 +5480,7 @@
         {
 
             // mask should be returned only if composite in disabled
-            if( !compositingActive() )
+            if( !( compositingActive() ) )
             {
                 if (QStyleHintReturnMask *mask = \
qstyleoption_cast<QStyleHintReturnMask *>(returnData))  { mask->region = \
_helper.roundedMask( option->rect ); } @@ -6160,8 +6160,11 @@
 
                 if( compositingActive() )
                 {
+                    p.setCompositionMode(QPainter::CompositionMode_Source );
                     TileSet *tileSet( _helper.roundCorner(color) );
                     tileSet->render( r, &p );
+
+                    p.setCompositionMode(QPainter::CompositionMode_SourceOver );
                     p.setClipRegion( _helper.roundedRegion( r.adjusted( 1, 1, -1, -1 \
) ), Qt::IntersectClip );  }
 
@@ -6232,10 +6235,12 @@
 
                 if( compositingActive() )
                 {
+
+                    p.setCompositionMode(QPainter::CompositionMode_Source );
                     TileSet *tileSet( _helper.roundCorner(color) );
                     tileSet->render( r, &p );
 
-                    // set clip region
+                    p.setCompositionMode(QPainter::CompositionMode_SourceOver );
                     p.setClipRegion( _helper.roundedRegion( r.adjusted( 1, 1, -1, -1 \
) ), Qt::IntersectClip );  
                 }
@@ -6322,10 +6327,12 @@
 
                 if( compositingActive() )
                 {
+                    p.setCompositionMode(QPainter::CompositionMode_Source );
                     TileSet *tileSet( _helper.roundCorner(color) );
                     tileSet->render( r, &p );
 
                     // set clip region
+                    p.setCompositionMode(QPainter::CompositionMode_SourceOver );
                     p.setClipRegion( _helper.roundedRegion( r.adjusted( 1, 1, -1, -1 \
) ), Qt::IntersectClip );  
                 }
@@ -6411,10 +6418,11 @@
 #ifndef Q_WS_WIN
                     if( compositingActive() )
                     {
+                        p.setCompositionMode(QPainter::CompositionMode_Source );
                         TileSet *tileSet( _helper.roundCorner(color) );
                         tileSet->render( r, &p );
 
-                        // set clip region
+                        p.setCompositionMode(QPainter::CompositionMode_SourceOver );
                         p.setClipRegion( _helper.roundedRegion( r.adjusted( 1, 1, \
-1, -1 ) ), Qt::IntersectClip );  }
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic