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