mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
improved animation
This commit is contained in:
@@ -83,9 +83,10 @@ bool AnimationHelper::partlyExpanded()
|
||||
if ( m_forceClosing )
|
||||
return false;
|
||||
|
||||
return m_fullyExpanded
|
||||
|| ( m_expandAnimation->state() == QPropertyAnimation::Running && m_expandAnimation->currentTime() > 250 )
|
||||
|| ( m_collapseAnimation->state() == QPropertyAnimation::Running && m_collapseAnimation->currentTime() < 100 );
|
||||
return m_size != m_startSize;
|
||||
// return m_fullyExpanded
|
||||
// || ( m_expandAnimation->state() == QPropertyAnimation::Running && m_expandAnimation->currentTime() > 250 )
|
||||
// || ( m_collapseAnimation->state() == QPropertyAnimation::Running && m_collapseAnimation->currentTime() < 100 );
|
||||
}
|
||||
|
||||
bool AnimationHelper::fullyExpanded()
|
||||
|
@@ -246,7 +246,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
painter->setFont( font );
|
||||
|
||||
textRect = itemsRect.adjusted( 0, 4, 0, 0 );
|
||||
painter->drawPixmap( textRect.x() + iconSpacing, textRect.y(), m_dropTypeImageMap.value( i ) );
|
||||
painter->drawPixmap( textRect.x() + iconSpacing, textRect.y(), m_dropTypeImageMap.value( i ).copy( 0, 0, 32, qMax( 4, textRect.height() ) ) );
|
||||
|
||||
int textSpacing = ( itemWidth - painter->fontMetrics().width( m_dropTypeTextMap.value( i ) ) ) / 2;
|
||||
textRect.adjust( textSpacing, 32 + 6, 0, 0 );
|
||||
|
Reference in New Issue
Block a user