1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-18 23:09:42 +01:00

Draw in correct option rect.

This commit is contained in:
Christian Muehlhaeuser 2015-03-11 06:45:13 +01:00
parent 52fb1ae0d1
commit 36cd708517

View File

@ -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 );