mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
* Tweak timeouts for the lazy-lists drop-down.
This commit is contained in:
parent
ec70b708d5
commit
02f65f4422
@ -28,12 +28,12 @@ AnimationHelper::AnimationHelper( const QModelIndex& index, QObject *parent )
|
||||
, m_expandAnimation( 0 )
|
||||
{
|
||||
m_expandTimer.setSingleShot( true );
|
||||
m_expandTimer.setInterval( 600 );
|
||||
connect( &m_expandTimer, SIGNAL( timeout() ), SLOT(expandTimeout() ) );
|
||||
m_expandTimer.setInterval( 1000 );
|
||||
connect( &m_expandTimer, SIGNAL( timeout() ), SLOT( expandTimeout() ) );
|
||||
|
||||
m_collapseTimer.setSingleShot( true );
|
||||
m_collapseTimer.setInterval( 600 );
|
||||
connect( &m_collapseTimer, SIGNAL( timeout() ), SLOT(collapseTimeout() ) );
|
||||
m_collapseTimer.setInterval( 0 );
|
||||
connect( &m_collapseTimer, SIGNAL( timeout() ), SLOT( collapseTimeout() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,7 +103,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
|
||||
int dropTypes = dropTypeCount( item );
|
||||
QSize originalSize = QSize( option.rect.width(), option.fontMetrics.height() * 1.4 );
|
||||
QSize targetSize = originalSize + QSize( 0, dropTypes == 0 ? 0 : 38 + option.fontMetrics.height() * 1.4 );
|
||||
m_expandedMap.value( index )->initialize( originalSize, targetSize, 300 );
|
||||
m_expandedMap.value( index )->initialize( originalSize, targetSize, 600 );
|
||||
m_expandedMap.value( index )->expand();
|
||||
}
|
||||
QMetaObject::invokeMethod( m_parent, "update", Qt::QueuedConnection, Q_ARG( QModelIndex, index ) );
|
||||
@ -1005,7 +1005,7 @@ SourceDelegate::hovered( const QModelIndex& index, const QMimeData* mimeData )
|
||||
{
|
||||
foreach ( AnimationHelper* helper, m_expandedMap )
|
||||
{
|
||||
helper->collapse();
|
||||
helper->collapse( true );
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1014,7 +1014,7 @@ SourceDelegate::hovered( const QModelIndex& index, const QMimeData* mimeData )
|
||||
{
|
||||
foreach ( AnimationHelper* helper, m_expandedMap )
|
||||
{
|
||||
helper->collapse();
|
||||
helper->collapse( true );
|
||||
}
|
||||
|
||||
m_newDropHoverIndex = index;
|
||||
|
Loading…
x
Reference in New Issue
Block a user