Merge pull request #553 from diizy/master
Timeline: Change loop points into different graphics
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 522 B |
BIN
data/themes/default/loop_point_b.png
Normal file
BIN
data/themes/default/loop_point_b.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 472 B |
BIN
data/themes/default/loop_point_e.png
Normal file
BIN
data/themes/default/loop_point_e.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 474 B |
@@ -149,7 +149,8 @@ protected:
|
||||
private:
|
||||
static QPixmap * s_timeLinePixmap;
|
||||
static QPixmap * s_posMarkerPixmap;
|
||||
static QPixmap * s_loopPointPixmap;
|
||||
static QPixmap * s_loopPointBeginPixmap;
|
||||
static QPixmap * s_loopPointEndPixmap;
|
||||
static QPixmap * s_loopPointDisabledPixmap;
|
||||
|
||||
AutoScrollStates m_autoScroll;
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
QPixmap * timeLine::s_timeLinePixmap = NULL;
|
||||
QPixmap * timeLine::s_posMarkerPixmap = NULL;
|
||||
QPixmap * timeLine::s_loopPointPixmap = NULL;
|
||||
|
||||
QPixmap * timeLine::s_loopPointBeginPixmap = NULL;
|
||||
QPixmap * timeLine::s_loopPointEndPixmap = NULL;
|
||||
|
||||
timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt,
|
||||
song::playPos & _pos, const MidiTime & _begin,
|
||||
@@ -81,10 +81,15 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt,
|
||||
s_posMarkerPixmap = new QPixmap( embed::getIconPixmap(
|
||||
"playpos_marker" ) );
|
||||
}
|
||||
if( s_loopPointPixmap == NULL )
|
||||
if( s_loopPointBeginPixmap == NULL )
|
||||
{
|
||||
s_loopPointPixmap = new QPixmap( embed::getIconPixmap(
|
||||
"loop_point" ) );
|
||||
s_loopPointBeginPixmap = new QPixmap( embed::getIconPixmap(
|
||||
"loop_point_b" ) );
|
||||
}
|
||||
if( s_loopPointEndPixmap == NULL )
|
||||
{
|
||||
s_loopPointEndPixmap = new QPixmap( embed::getIconPixmap(
|
||||
"loop_point_e" ) );
|
||||
}
|
||||
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
||||
@@ -235,8 +240,8 @@ void timeLine::paintEvent( QPaintEvent * )
|
||||
p.setPen( QColor( 0, 0, 0 ) );
|
||||
|
||||
p.setOpacity( loopPointsEnabled() ? 0.9 : 0.2 );
|
||||
p.drawPixmap( markerX( loopBegin() )+2, 2, *s_loopPointPixmap );
|
||||
p.drawPixmap( markerX( loopEnd() )+2, 2, *s_loopPointPixmap );
|
||||
p.drawPixmap( markerX( loopBegin() )+2, 2, *s_loopPointBeginPixmap );
|
||||
p.drawPixmap( markerX( loopEnd() )+2, 2, *s_loopPointEndPixmap );
|
||||
p.setOpacity( 1.0 );
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user