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