Commit 36d4f740 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Draw the audio/video separator

parent 8224979f
......@@ -80,8 +80,16 @@ void TracksView::createLayout()
container->setContentsMargins( 0, 0, 0, 0 );
container->setLayout( m_layout );
// Create the initial layout
// - 1 video track
// - a separator
// - 1 audio track
addVideoTrack();
addVideoTrack();
m_separator = new QGraphicsWidget();
m_separator->setPreferredHeight( 20 );
m_layout->insertItem( 1, m_separator );
addAudioTrack();
m_scene->addItem( container );
......@@ -190,6 +198,15 @@ void TracksView::resizeEvent( QResizeEvent* event )
void TracksView::drawBackground( QPainter* painter, const QRectF& rect )
{
QRectF r = rect;
r.setWidth( r.width() + 1 );
painter->setBrush( palette().dark() );
painter->setPen( Qt::transparent );
painter->drawRect( r.left(), m_separator->y(),
r.right(),
m_separator->boundingRect().height() );
/*QColor base = palette().button().color();
QRectF r = rect;
r.setWidth( r.width() + 1 );
......
......@@ -114,6 +114,7 @@ private:
int m_numAudioTrack;
MainWorkflow* m_mainWorkflow;
GraphicsMovieItem* m_dragItem;
QGraphicsWidget* m_separator;
signals:
void zoomIn();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment