Commit f5ff9ebc authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: SeekSlider: fix chapters marks contrast

parent d9477486
......@@ -397,13 +397,18 @@ void SeekSlider::paintEvent( QPaintEvent *event )
/* draw chapters tickpoints */
if ( chapters && inputLength && size().width() )
{
QColor background = palette().color( QPalette::Active, QPalette::Background );
QColor foreground = palette().color( QPalette::Active, QPalette::WindowText );
foreground.setHsv( foreground.hue(),
( background.saturation() + foreground.saturation() ) / 2,
( background.value() + foreground.value() ) / 2 );
if ( orientation() == Qt::Horizontal ) /* TODO: vertical */
{
QList<SeekPoint> points = chapters->getPoints();
foreach( SeekPoint point, points )
{
int x = point.time / 1000000.0 / inputLength * size().width();
painter.setPen( QColor( 80, 80, 80 ) );
painter.setPen( foreground );
painter.setBrush( Qt::NoBrush );
painter.drawLine( x, 0, x, CHAPTERSSPOTSIZE );
painter.drawLine( x, height(), x, height() - CHAPTERSSPOTSIZE );
......
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