]> git.sur5r.net Git - minitube/commitdiff
Cleanup
authorFlavio Tordini <flavio.tordini@gmail.com>
Sat, 15 Aug 2009 14:44:25 +0000 (16:44 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Sat, 15 Aug 2009 14:44:25 +0000 (16:44 +0200)
src/playlist/PrettyItemDelegate.cpp

index d70dfd5a76023938be0eed22486339f82dbe37e1..aa6fd887a22c3f631a110dbb5d23852ec316fe15 100644 (file)
@@ -24,13 +24,11 @@ void PrettyItemDelegate::createPlayIcon() {
     painter.setBrush(Qt::white);
     QPen pen;
     pen.setColor(Qt::white);
-    pen.setWidth(10);
+    pen.setWidth(PADDING);
     pen.setJoinStyle(Qt::RoundJoin);
     pen.setCapStyle(Qt::RoundCap);
     painter.setPen(pen);
-    painter.setOpacity(1);
     painter.drawPolygon(polygon);
-    painter.end();
 }
 
 PrettyItemDelegate::~PrettyItemDelegate() { }
@@ -72,10 +70,10 @@ void PrettyItemDelegate::paintBody( QPainter* painter,
 
     const bool isActive = index.data( ActiveTrackRole ).toBool();
     const bool isSelected = option.state & QStyle::State_Selected;
-    if (isActive) {
-        // draw the "current track" highlight underneath the text
-        if (!isSelected)
-            paintActiveOverlay(painter, line.x(), line.y(), line.width(), line.height());
+
+    // draw the "current track" highlight underneath the text
+    if (isActive && !isSelected) {
+        paintActiveOverlay(painter, line.x(), line.y(), line.width(), line.height());
     }
 
     // get the video metadata