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

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/context/applets/photos
From:       Simon Esneault <simon.esneault () gmail ! com>
Date:       2009-06-23 13:01:00
Message-ID: 1245762060.819085.10436.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 985701 by sesneault:

Fix the widget being stuck when the border is reach



 M  +1 -1      PhotosApplet.cpp  
 M  +4 -5      PhotosScrollWidget.cpp  


--- trunk/extragear/multimedia/amarok/src/context/applets/photos/PhotosApplet.cpp \
#985700:985701 @@ -49,7 +49,7 @@
     , m_settingsIcon( 0 )
 {
     DEBUG_BLOCK
-    setHasConfigurationInterface( false );
+    setHasConfigurationInterface( true );
 }
 
 void 
--- trunk/extragear/multimedia/amarok/src/context/applets/photos/PhotosScrollWidget.cpp \
#985700:985701 @@ -90,18 +90,17 @@
 {
     Q_UNUSED( anim );
 
-    // check if we can move or not
-    if ( this->childItems().last()->pos().x() + 10 > m_scrollmax )
+    // If we're are near the border and still asking to go higher !
+    if ( ( this->childItems().last()->pos().x() - 10 ) > m_scrollmax && m_speed < 0)
     {
-        debug()<< "PhotosScrollWidget:: > m_scrollmax " << \
this->childItems().first()->pos().x() - abs( m_speed ) ;  \
Plasma::Animator::self()->stopCustomAnimation( m_id );  m_id = 0;
         return;
     }
 
-    if ( this->childItems().last()->pos().x() - 10 < 0 )
+    // If we're are near the border and still asking to go down
+    if ( ( this->childItems().last()->pos().x() - 10 < 0 ) && ( m_speed > 0 ) )
     {
-        debug()<< "PhotosScrollWidget:: < 0 " << \
this->childItems().first()->pos().x() - m_speed ;  \
Plasma::Animator::self()->stopCustomAnimation( m_id );  m_id = 0;
         return;


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

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