From 36cd70851729620c481947ccab74fa3808bdaa95 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 11 Mar 2015 06:45:13 +0100 Subject: [PATCH] Draw in correct option rect. --- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index b9e8c630b..c0965617f 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -284,13 +284,8 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt else */ if ( index.column() == PlayableModel::Download ) { -/* QStyleOptionButton opt; - opt.state = QStyle::State_Active | QStyle::State_Enabled; - opt.rect = QRect( 50, 25, 100, 50 ); - style()->drawControl( QStyle::CE_PushButton, &opt, &painter );*/ - QStyleOptionComboBox optc; - optc.rect.adjust( 4, 0, -4, 0 ); + optc.rect = opt.rect.adjusted( 4, 0, -4, 0 ); optc.editable = false; // sDebug() << item->track()->currentFormat() << item->track()->formats().count(); optc.currentText = tr( "Download %1" ).arg( item->result()->downloadFormats().first().extension );