mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 11:30:49 +02:00
* Proper minimum sizeHints for OSX.
This commit is contained in:
@@ -11,7 +11,6 @@ using namespace Tomahawk;
|
|||||||
QueueView::QueueView( QWidget* parent )
|
QueueView::QueueView( QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
{
|
{
|
||||||
setMinimumHeight( 27 );
|
|
||||||
setLayout( new QVBoxLayout() );
|
setLayout( new QVBoxLayout() );
|
||||||
|
|
||||||
m_queue = new PlaylistView( this );
|
m_queue = new PlaylistView( this );
|
||||||
|
@@ -5,6 +5,12 @@
|
|||||||
|
|
||||||
#define ANIMATION_TIME 500
|
#define ANIMATION_TIME 500
|
||||||
|
|
||||||
|
#ifdef Q_WS_MAC
|
||||||
|
#define MINIMUM_HEIGHT 38
|
||||||
|
#else
|
||||||
|
#define MINIMUM_HEIGHT 27
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
AnimatedSplitter::AnimatedSplitter( QWidget* parent )
|
AnimatedSplitter::AnimatedSplitter( QWidget* parent )
|
||||||
: QSplitter( parent )
|
: QSplitter( parent )
|
||||||
@@ -60,7 +66,7 @@ AnimatedSplitter::hide( int index, bool animate )
|
|||||||
m_animateIndex = index;
|
m_animateIndex = index;
|
||||||
|
|
||||||
QWidget* w = widget( index );
|
QWidget* w = widget( index );
|
||||||
w->setMinimumHeight( 27 );
|
w->setMinimumHeight( MINIMUM_HEIGHT );
|
||||||
m_greedyHeight = widget( m_greedyIndex )->height();
|
m_greedyHeight = widget( m_greedyIndex )->height();
|
||||||
|
|
||||||
m_animateForward = false;
|
m_animateForward = false;
|
||||||
@@ -68,7 +74,7 @@ AnimatedSplitter::hide( int index, bool animate )
|
|||||||
{
|
{
|
||||||
|
|
||||||
QTimeLine *timeLine = new QTimeLine( ANIMATION_TIME, this );
|
QTimeLine *timeLine = new QTimeLine( ANIMATION_TIME, this );
|
||||||
timeLine->setFrameRange( 27, w->height() );
|
timeLine->setFrameRange( MINIMUM_HEIGHT, w->height() );
|
||||||
timeLine->setUpdateInterval( 5 );
|
timeLine->setUpdateInterval( 5 );
|
||||||
timeLine->setDirection( QTimeLine::Backward );
|
timeLine->setDirection( QTimeLine::Backward );
|
||||||
timeLine->setEasingCurve( QEasingCurve::OutBack );
|
timeLine->setEasingCurve( QEasingCurve::OutBack );
|
||||||
@@ -79,7 +85,7 @@ AnimatedSplitter::hide( int index, bool animate )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
onAnimationStep( 27 );
|
onAnimationStep( MINIMUM_HEIGHT );
|
||||||
onAnimationFinished();
|
onAnimationFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +186,7 @@ AnimatedSplitter::onAnimationFinished()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w->setMaximumHeight( 27 );
|
w->setMaximumHeight( MINIMUM_HEIGHT );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_animateIndex = -1;
|
m_animateIndex = -1;
|
||||||
|
Reference in New Issue
Block a user