mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Fix jagged line in jobsview
This commit is contained in:
@@ -247,3 +247,26 @@ AnimatedWidget::onAnimationFinished()
|
|||||||
setFixedHeight( hiddenSize().height() );
|
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:
|
public:
|
||||||
explicit AnimatedSplitterHandle( Qt::Orientation orientation, QSplitter* parent )
|
explicit AnimatedSplitterHandle( Qt::Orientation orientation, QSplitter* parent )
|
||||||
: QSplitterHandle( orientation, parent )
|
: QSplitterHandle( orientation, parent )
|
||||||
|
, m_indexInSplitter( -1 )
|
||||||
|
, m_lastCount( -1 )
|
||||||
{
|
{
|
||||||
setCursor( Qt::ArrowCursor );
|
setCursor( Qt::ArrowCursor );
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QSize sizeHint() const
|
virtual QSize sizeHint() const;
|
||||||
{
|
|
||||||
return QSize( 0, 0 );
|
private:
|
||||||
}
|
mutable int m_indexInSplitter;
|
||||||
|
mutable int m_lastCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user