1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 07:19:42 +01:00

* Animate the JobStatusView when it changes its size.

This commit is contained in:
Christian Muehlhaeuser 2011-11-28 10:22:44 +01:00
parent 68cf583e4b
commit 2585467f0a
3 changed files with 5 additions and 6 deletions

View File

@ -72,8 +72,6 @@ JobStatusView::JobStatusView( AnimatedSplitter* parent )
setFont( f );
#endif
hideWidget();
new PipelineStatusManager( this );
new TransferStatusManager( this );
new LatchedStatusManager( this );
@ -95,10 +93,8 @@ JobStatusView::checkCount()
{
if ( m_view->model()->rowCount() == 0 && !isHidden() )
emit hideWidget();
else if ( isHidden() && m_view->model()->rowCount() > 0 )
emit showWidget();
else
emit sizeChanged( sizeHint() );
emit sizeHintChanged( sizeHint() );
}

View File

@ -61,7 +61,8 @@ AnimatedSplitter::addWidget( AnimatedWidget* widget )
connect( widget, SIGNAL( showWidget() ), SLOT( onShowRequest() ) );
connect( widget, SIGNAL( hideWidget() ), SLOT( onHideRequest() ) );
connect( widget, SIGNAL( sizeChanged( QSize) ), SLOT( onSizeChanged( QSize ) ) );
connect( widget, SIGNAL( sizeHintChanged( QSize ) ), SLOT( onShowRequest() ) );
connect( widget, SIGNAL( sizeChanged( QSize ) ), SLOT( onSizeChanged( QSize ) ) );
connect( this, SIGNAL( shown( QWidget*, bool ) ), widget, SLOT( onShown( QWidget*, bool ) ) );
connect( this, SIGNAL( hidden( QWidget*, bool ) ), widget, SLOT( onHidden( QWidget*, bool ) ) );
@ -248,6 +249,7 @@ AnimatedWidget::onAnimationFinished()
}
}
QSize
AnimatedSplitterHandle::sizeHint() const
{

View File

@ -100,6 +100,7 @@ signals:
void hideWidget();
void sizeChanged( const QSize& size );
void sizeHintChanged( const QSize& size );
void hiddenSizeChanged();
private slots: