Show
Ignore:
Timestamp:
03/01/10 01:24:14 (3 years ago)
Author:
wolke
Message:

merge rev 1578:1580 from trunk

Location:
branches/undo
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/undo

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/undo/gui/src/PatternEditor/PianoRollEditor.cpp

    r1579 r1581  
    423423        uint h = m_nRowHeight - 2; 
    424424 
    425         int red = (int) (pNote->get_velocity() * 255); 
    426         int green; 
    427         int blue; 
    428         blue = (255 - (int) red)* .33; 
    429         green =  (255 - (int) red); 
     425        QColor color = m_pPatternEditorPanel->getDrumPatternEditor()->computeNoteColor( pNote->get_velocity() ); 
    430426 
    431427        if ( pNote->get_length() == -1 && pNote->get_noteoff() == false ) { 
    432                 pPainter->setBrush(QColor( red,green,blue )); 
     428                pPainter->setBrush( color ); 
    433429                pPainter->drawEllipse( start_x -4 , start_y, w, h ); 
    434430        } 
     
    444440                nend = nend - 1;        // lascio un piccolo spazio tra una nota ed un altra 
    445441 
    446                 pPainter->setBrush(QColor( red,green,blue )); 
    447                 pPainter->fillRect( start_x, start_y, nend, h, QColor( red,green,blue ) ); 
     442                pPainter->setBrush( color ); 
     443                pPainter->fillRect( start_x, start_y, nend, h, color ); 
    448444                pPainter->drawRect( start_x, start_y, nend, h ); 
    449445        }