mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
Covers aren't showing up now...but at least we're not pegging CPU. Will continue to fix in a bit
This commit is contained in:
@@ -106,8 +106,6 @@ PixmapDelegateFader::init()
|
||||
m_current = QPixmap( m_size );
|
||||
m_current.fill( Qt::transparent );
|
||||
|
||||
stlInstance().data()->setUpdateInterval( 20 );
|
||||
|
||||
if ( m_currentReference.isNull() )
|
||||
{
|
||||
// No cover loaded yet, use default and don't fade in
|
||||
@@ -135,7 +133,7 @@ PixmapDelegateFader::albumChanged()
|
||||
if ( m_album.isNull() )
|
||||
return;
|
||||
|
||||
setPixmap( m_album->cover( m_size ) );
|
||||
QMetaObject::invokeMethod( this, "setPixmap", Qt::QueuedConnection, Q_ARG( QPixmap, m_album->cover( m_size ) ) );
|
||||
}
|
||||
|
||||
void
|
||||
@@ -144,7 +142,7 @@ PixmapDelegateFader::artistChanged()
|
||||
if ( m_artist.isNull() )
|
||||
return;
|
||||
|
||||
setPixmap( m_artist->cover( m_size ) );
|
||||
QMetaObject::invokeMethod( this, "setPixmap", Qt::QueuedConnection, Q_ARG( QPixmap, m_artist->cover( m_size ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +152,7 @@ PixmapDelegateFader::trackChanged()
|
||||
if ( m_track.isNull() )
|
||||
return;
|
||||
|
||||
setPixmap( m_track->cover( m_size ) );
|
||||
QMetaObject::invokeMethod( this, "setPixmap", Qt::QueuedConnection, Q_ARG( QPixmap, m_track->cover( m_size ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -183,6 +181,7 @@ PixmapDelegateFader::setPixmap( const QPixmap& pixmap )
|
||||
m_oldReference = m_currentReference;
|
||||
m_currentReference = pixmap;
|
||||
|
||||
stlInstance().data()->setUpdateInterval( 20 );
|
||||
m_startFrame = stlInstance().data()->currentFrame();
|
||||
m_connectedToStl = true;
|
||||
m_fadePct = 0;
|
||||
@@ -270,13 +269,12 @@ void
|
||||
PixmapDelegateFader::onAnimationFinished()
|
||||
{
|
||||
m_oldReference = QPixmap();
|
||||
onAnimationStep( INT_MAX );
|
||||
|
||||
m_connectedToStl = false;
|
||||
disconnect( stlInstance().data(), SIGNAL( frameChanged( int ) ), this, SLOT( onAnimationStep( int ) ) );
|
||||
|
||||
if ( !m_pixmapQueue.isEmpty() )
|
||||
setPixmap( m_pixmapQueue.dequeue() );
|
||||
QMetaObject::invokeMethod( this, "setPixmap", Qt::QueuedConnection, Q_ARG( QPixmap, m_pixmapQueue.dequeue() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -141,7 +141,6 @@ FadingPixmap::mouseReleaseEvent( QMouseEvent* event )
|
||||
void
|
||||
FadingPixmap::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
Q_UNUSED( event );
|
||||
|
||||
QPainter p( this );
|
||||
|
Reference in New Issue
Block a user