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

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Mark Kretschmann <markey () web ! de>
Date:       2007-05-06 6:55:42
Message-ID: 1178434542.628722.22992.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 661631 by markey:

Don't draw bullshit-salad in the slider when the engine is stopped.


 M  +14 -10    progressslider.cpp  


--- trunk/extragear/multimedia/amarok/src/progressslider.cpp #661630:661631
@@ -55,17 +55,21 @@
 ProgressSlider::paintEvent( QPaintEvent *e )
 {
     Amarok::PrettySlider::paintEvent( e );
-    QPainter p( this );
-    foreach( uint it, m_bookmarks )
+
+    if( isEnabled() )
     {
-        const int pos = int( double( width() ) / maximum() * ( it * 1000 ) );
-        Bookmark pa( 3, it );
-        pa.setPoint( 0, pos - 5, 1 );
-        pa.setPoint( 1, pos + 5, 1 );
-        pa.setPoint( 2, pos,     9 );
-        p.setBrush( Qt::red );
-        m_polygons << pa;
-        p.drawConvexPolygon( pa );
+        QPainter p( this );
+        foreach( uint it, m_bookmarks )
+        {
+            const int pos = int( double( width() ) / maximum() * ( it * 1000 ) );
+            Bookmark pa( 3, it );
+            pa.setPoint( 0, pos - 5, 1 );
+            pa.setPoint( 1, pos + 5, 1 );
+            pa.setPoint( 2, pos,     9 );
+            p.setBrush( Qt::red );
+            m_polygons << pa;
+            p.drawConvexPolygon( pa );
+        }
     }
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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