1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

* Cleanups.

This commit is contained in:
Christian Muehlhaeuser
2013-04-16 12:42:54 +02:00
parent 9a67ea2074
commit 05d2fbdfae
3 changed files with 2 additions and 12 deletions

View File

@@ -99,16 +99,6 @@ PlaylistChartItemDelegate::sizeHint( const QStyleOptionViewItem& option, const Q
}
QWidget*
PlaylistChartItemDelegate::createEditor( QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
Q_UNUSED( parent );
Q_UNUSED( option );
Q_UNUSED( index );
return 0;
}
void
PlaylistChartItemDelegate::prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item ) const
{
@@ -143,7 +133,7 @@ PlaylistChartItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem&
painter->save();
{
QRect r = opt.rect.adjusted( 4, 6, 0, -6 );
// Paint Now Playing Speaker Icon
if ( item->isPlaying() )
{

View File

@@ -48,7 +48,6 @@ signals:
protected:
void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
private slots:
void modelChanged();

View File

@@ -203,6 +203,7 @@ PlaylistItemDelegate::paintShort( QPainter* painter, const QStyleOptionViewItem&
text = painter->fontMetrics().elidedText( lowerText, Qt::ElideRight, r.width() );
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_bottomOption );
}
painter->restore();
}