From: Flavio Tordini Date: Mon, 2 Nov 2009 20:25:15 +0000 (+0100) Subject: Removed useless QPalette instance X-Git-Tag: 0.8~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8aa687e5b8b33ca02bac132ec36c6cc623313501;p=minitube Removed useless QPalette instance --- diff --git a/src/playlist/PrettyItemDelegate.cpp b/src/playlist/PrettyItemDelegate.cpp index 4640417..c916d0d 100644 --- a/src/playlist/PrettyItemDelegate.cpp +++ b/src/playlist/PrettyItemDelegate.cpp @@ -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();