mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
Fix jagged line in jobsview
This commit is contained in:
parent
af19a09a3c
commit
c569678a26
@ -247,3 +247,26 @@ AnimatedWidget::onAnimationFinished()
|
||||
setFixedHeight( hiddenSize().height() );
|
||||
}
|
||||
}
|
||||
|
||||
QSize
|
||||
AnimatedSplitterHandle::sizeHint() const
|
||||
{
|
||||
// Re-calculate our position if the items in the splitter changed, or if we haven't calculated it yet
|
||||
if ( m_indexInSplitter == -1 || m_lastCount != splitter()->count() )
|
||||
{
|
||||
for ( int i = 0; i < splitter()->count(); i++ )
|
||||
{
|
||||
if ( splitter()->handle( i ) == this )
|
||||
{
|
||||
m_indexInSplitter = i;
|
||||
}
|
||||
}
|
||||
m_lastCount = splitter()->count();
|
||||
}
|
||||
|
||||
// sizeHint is 0,0 if widget below handle has size 0 or is hidden
|
||||
if ( splitter()->widget( m_indexInSplitter )->height() == 0 )
|
||||
return QSize( 0, 0 );
|
||||
else
|
||||
return QSize( 1, 1 );
|
||||
}
|
||||
|
@ -65,14 +65,17 @@ Q_OBJECT
|
||||
public:
|
||||
explicit AnimatedSplitterHandle( Qt::Orientation orientation, QSplitter* parent )
|
||||
: QSplitterHandle( orientation, parent )
|
||||
, m_indexInSplitter( -1 )
|
||||
, m_lastCount( -1 )
|
||||
{
|
||||
setCursor( Qt::ArrowCursor );
|
||||
}
|
||||
|
||||
virtual QSize sizeHint() const
|
||||
{
|
||||
return QSize( 0, 0 );
|
||||
}
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
private:
|
||||
mutable int m_indexInSplitter;
|
||||
mutable int m_lastCount;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user