diff --git a/data/themes/default/autoscroll_off.png b/data/themes/default/autoscroll_off.png index fdce09fcf..2942c9a72 100644 Binary files a/data/themes/default/autoscroll_off.png and b/data/themes/default/autoscroll_off.png differ diff --git a/data/themes/default/autoscroll_on.png b/data/themes/default/autoscroll_on.png index 627ecd953..fd87c9248 100644 Binary files a/data/themes/default/autoscroll_on.png and b/data/themes/default/autoscroll_on.png differ diff --git a/data/themes/default/loop_point.png b/data/themes/default/loop_point.png index 64e748dd1..2f60a2297 100644 Binary files a/data/themes/default/loop_point.png and b/data/themes/default/loop_point.png differ diff --git a/data/themes/default/loop_point_disabled.png b/data/themes/default/loop_point_disabled.png deleted file mode 100644 index 4ab9f0d78..000000000 Binary files a/data/themes/default/loop_point_disabled.png and /dev/null differ diff --git a/data/themes/default/loop_points_off.png b/data/themes/default/loop_points_off.png index b65c6f33d..6d2ea290b 100644 Binary files a/data/themes/default/loop_points_off.png and b/data/themes/default/loop_points_off.png differ diff --git a/data/themes/default/loop_points_on.png b/data/themes/default/loop_points_on.png index 5185b1f1c..9d4fb7283 100644 Binary files a/data/themes/default/loop_points_on.png and b/data/themes/default/loop_points_on.png differ diff --git a/data/themes/default/playpos_marker.png b/data/themes/default/playpos_marker.png index cc47800d6..157b2b978 100644 Binary files a/data/themes/default/playpos_marker.png and b/data/themes/default/playpos_marker.png differ diff --git a/data/themes/default/style.css b/data/themes/default/style.css index e6215d8ac..2634ff90f 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -132,6 +132,10 @@ fxMixerView QPushButton, effectRackView QPushButton, controllerRackView QPushBut font-size: 10px; } +timeLine { + font-size: 8px; +} + /* Plugins */ tripleOscillatorView knob { diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index 742c7e200..3e0025829 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -46,7 +46,6 @@ QPixmap * timeLine::s_timeLinePixmap = NULL; QPixmap * timeLine::s_posMarkerPixmap = NULL; QPixmap * timeLine::s_loopPointPixmap = NULL; -QPixmap * timeLine::s_loopPointDisabledPixmap = NULL; timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, @@ -86,12 +85,6 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, "loop_point" ) ); } - if( s_loopPointDisabledPixmap == NULL ) - { - s_loopPointDisabledPixmap = new QPixmap( embed::getIconPixmap( - "loop_point_disabled" ) ); - } - move( 0, _yoff ); setFixedHeight( s_timeLinePixmap->height() ); @@ -231,18 +224,23 @@ void timeLine::paintEvent( QPaintEvent * ) { QPainter p( this ); - for( int x = 0; x < width(); x += s_timeLinePixmap->width() ) - { - p.drawPixmap( x, 0, *s_timeLinePixmap ); - } + QColor bg_color = QApplication::palette().color( QPalette::Active, + QPalette::Background ); + QLinearGradient g( 0, 0, 0, height() ); +// g.setColorAt( 0, bg_color.darker( 250 ) ); + g.setColorAt( 0, bg_color.lighter( 150 ) ); + g.setColorAt( 1, bg_color.darker( 150 ) ); + p.fillRect( 0, 0, width(), height(), g ); + p.setClipRect( m_xOffset, 0, width() - m_xOffset, height() ); p.setPen( QColor( 0, 0, 0 ) ); - const QPixmap & lpoint = loopPointsEnabled() ? - *s_loopPointPixmap : - *s_loopPointDisabledPixmap; - p.drawPixmap( markerX( loopBegin() ), 4, lpoint ); - p.drawPixmap( markerX( loopEnd() ), 4, lpoint ); + const QPixmap & lpoint = *s_loopPointPixmap; + + p.setOpacity( loopPointsEnabled() ? 0.9 : 0.2 ); + p.drawPixmap( markerX( loopBegin() )+2, 2, lpoint ); + p.drawPixmap( markerX( loopEnd() )+2, 2, lpoint ); + p.setOpacity( 1.0 ); tact tact_num = m_begin.getTact(); @@ -251,24 +249,26 @@ void timeLine::paintEvent( QPaintEvent * ) midiTime::ticksPerTact() ) % static_cast( m_ppt ) ); + p.setPen( QColor( 192, 192, 192 ) ); for( int i = 0; x + i * m_ppt < width(); ++i ) { + const int cx = x + qRound( i * m_ppt ); + p.drawLine( cx, 5, cx, height() - 6 ); ++tact_num; if( ( tact_num - 1 ) % - tMax( 1, static_cast( - (float) midiTime::ticksPerTact() / + tMax( 1, qRound( 1.0f / 3.0f * midiTime::ticksPerTact() / m_ppt ) ) == 0 ) { - p.setPen( QColor( 224, 224, 224 ) ); - p.drawText( x + static_cast( i * m_ppt ) + 1, 15, - QString::number( tact_num ) ); - p.setPen( QColor( 0, 0, 0 ) ); - p.drawText( x + static_cast( i * m_ppt ), 14, - QString::number( tact_num ) ); + const QString s = QString::number( tact_num ); + p.drawText( cx + qRound( ( m_ppt - p.fontMetrics(). + width( s ) ) / 2 ), + height() - p.fontMetrics().height() / 2, s ); } } - p.drawPixmap( m_posMarkerX, 4, *s_posMarkerPixmap ); + p.setOpacity( 0.75 ); + p.drawImage( m_posMarkerX, height() - s_posMarkerPixmap->height(), + s_posMarkerPixmap->toImage() ); } diff --git a/src/core/track.cpp b/src/core/track.cpp index 064fff713..ec1366a49 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -1150,9 +1150,10 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) backgrnd = QPixmap( w * 2, height() ); QPainter pmp( &backgrnd ); //pmp.setRenderHint( QPainter::Antialiasing ); - - QLinearGradient grad( 0,1, 0,h-2 ); - pmp.fillRect( 0, 0, w, h, QColor(128, 128, 128) ); + + QLinearGradient grad( 0, 1, 0, h-2 ); + pmp.fillRect( 0, 0, 1, h, QColor( 96, 96, 96 ) ); + pmp.fillRect( 1, 0, w+1, h, QColor( 128, 128, 128 ) ); grad.setColorAt( 0.0, QColor( 64, 64, 64 ) ); grad.setColorAt( 0.3, QColor( 128, 128, 128 ) ); grad.setColorAt( 0.5, QColor( 128, 128, 128 ) ); @@ -1162,7 +1163,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) pmp.fillRect( 0, 1, w, h-2, grad ); QLinearGradient grad2( 0,1, 0, h-2 ); - pmp.fillRect( w, 0, w , h, QColor(96, 96, 96) ); + pmp.fillRect( w+1, 0, w , h, QColor( 96, 96, 96 ) ); grad2.setColorAt( 0.0, QColor( 48, 48, 48 ) ); grad2.setColorAt( 0.3, QColor( 96, 96, 96 ) ); grad2.setColorAt( 0.5, QColor( 96, 96, 96 ) ); @@ -1170,10 +1171,10 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) //grad2.setColorAt( 1.0, QColor( 96, 96, 96 ) ); //grad2.setColorAt( 1.0, QColor( 48, 48, 48 ) ); pmp.fillRect( w, 1, w , h-2, grad2 ); - + // draw vertical lines //pmp.setPen( QPen( QBrush( QColor( 80, 84, 96, 192 ) ), 1 ) ); - pmp.setPen( QPen( QColor( 0,0,0, 112 ), 1 ) ); + pmp.setPen( QPen( QColor( 0, 0, 0, 112 ), 1 ) ); for( float x = 0.5; x < w * 2; x += ppt ) { pmp.drawLine( QLineF( x, 1.0, x, h-2.0 ) ); @@ -1181,7 +1182,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) //pmp.setPen( QPen( QColor( 255,0,0, 128 ), 1 ) ); pmp.drawLine( 0, 1, w*2, 1 ); - pmp.setPen( QPen( QColor( 255,255,255, 32 ), 1 ) ); + pmp.setPen( QPen( QColor( 255, 255, 255, 32 ), 1 ) ); for( float x = 1.5; x < w * 2; x += ppt ) { pmp.drawLine( QLineF( x, 1.0, x, h-2.0 ) ); @@ -1193,7 +1194,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) last_geometry = ppt*h; } - + // Don't draw background on BB-Editor if( m_trackView->getTrackContainerView() != engine::getBBEditor() ) {