Commit 2434f2b2 authored by Ludovic Fauvet's avatar Ludovic Fauvet

timeline: improve cursor rendering

parent a295cbd1
......@@ -162,10 +162,11 @@ TracksRuler::paintEvent( QPaintEvent* e )
painter.drawLine( ( int )f, BIG_MARK_X1, ( int )f, BIG_MARK_X2 );
// Draw the pointer
int cursorPos = m_tracksView->cursorPos() * m_factor - offset();
int cursorPos = m_tracksView->cursorPos() * m_factor + 0.5 - offset();
QPolygon cursor( 3 );
cursor.setPoints( 3, cursorPos - 9, 11, cursorPos + 9, 11, cursorPos, 30 );
cursor.setPoints( 3, cursorPos - 8, 15, cursorPos + 8, 15, cursorPos, 30 );
painter.setBrush( QBrush( QColor( 82, 97, 122, 150 ) ) );
painter.setRenderHint(QPainter::Antialiasing, true);
painter.drawPolygon( cursor );
}
......
......@@ -81,7 +81,7 @@ TracksView::TracksView( QGraphicsScene *scene, MainWorkflow *mainWorkflow,
setAlignment( Qt::AlignLeft | Qt::AlignTop );
setCacheMode( QGraphicsView::CacheBackground );
m_cursorLine = new GraphicsCursorItem( QPen( QColor( 220, 30, 30 ) ) );
m_cursorLine = new GraphicsCursorItem( QPen( QColor( 255, 0, 0, 125 ), 2 ) );
m_scene->addItem( m_cursorLine );
......
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