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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kstyles/oxygen
From:       Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date:       2010-04-24 19:27:23
Message-ID: 20100424192723.0B182AC8A2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1118446 by hpereiradacosta:

fixed double painting of the shadow for non-autoraise toolbuttons

 M  +5 -6      oxygen.cpp  


--- trunk/KDE/kdebase/workspace/kstyles/oxygen/oxygen.cpp #1118445:1118446
@@ -376,13 +376,15 @@
 
     if( !widget ) return false;
 
-    // handle inactive (but animated) toolbuttons
-    //Extract the stuff we need out of the option
+    // check autoRaise state
     State flags( option->state );
+    bool isInToolBar( widget->parent() && widget->parent()->inherits( "QToolBar" ) \
); +    if( !( isInToolBar || (flags & State_AutoRaise) ) ) return false;
+
+    // get rect and palette
     QRect rect( option->rect );
     QPalette palette( option->palette );
 
-
     // local clone of toolbutton option
     const QStyleOptionToolButton *tbOption( qstyleoption_cast<const \
QStyleOptionToolButton *>(option) );  if( !tbOption ) return false;
@@ -390,8 +392,6 @@
     // make local copy
     QStyleOptionToolButton localTbOption(*tbOption);
 
-    bool isInToolBar( widget->parent() && widget->parent()->inherits( "QToolBar" ) \
                );
-
     const bool enabled = flags & State_Enabled;
     const bool mouseOver(enabled && (flags & State_MouseOver));
     const bool hasFocus(enabled && (flags&State_HasFocus));
@@ -424,7 +424,6 @@
     if( enabled && !(mouseOver || hasFocus || sunken ) )
     {
 
-        //if( hoverAnimated || (focusAnimated && !hasFocus) )
         if( hoverAnimated || (focusAnimated && !hasFocus) || ( ((toolBarAnimated && \
animatedRect.isNull())||toolBarTimerActive) && current ) )  {
             QRect buttonRect = subControlRect(CC_ToolButton, option, SC_ToolButton, \
widget);


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

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