]> git.sur5r.net Git - minitube/commitdiff
Removed useless QPalette instance
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 2 Nov 2009 20:25:15 +0000 (21:25 +0100)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 2 Nov 2009 20:25:15 +0000 (21:25 +0100)
src/playlist/PrettyItemDelegate.cpp

index 4640417cf5c09f0b5fbe3bcf00ad96000898b94e..c916d0d5c8f159e8c032fbb9599780bd156f564c 100644 (file)
@@ -70,8 +70,6 @@ void PrettyItemDelegate::paintBody( QPainter* painter,
     const QRectF line(0, 0, option.rect.width(), option.rect.height());
     painter->setClipRect(line);
 
-    QPalette palette;
-
     const bool isActive = index.data( ActiveTrackRole ).toBool();
     const bool isSelected = option.state & QStyle::State_Selected;
 
@@ -165,7 +163,7 @@ void PrettyItemDelegate::paintBody( QPainter* painter,
     */
 
     // separator
-    painter->setPen(palette.color(QPalette::Midlight));
+    painter->setPen(option.palette.color(QPalette::Midlight));
     painter->drawLine(0, THUMB_HEIGHT, line.width(), THUMB_HEIGHT);
 
     painter->restore();