Changeset 1581 for branches/undo/gui/src/PatternEditor/PianoRollEditor.cpp
- Timestamp:
- 03/01/10 01:24:14 (3 years ago)
- Location:
- branches/undo
- Files:
-
- 2 modified
-
. (modified) (1 prop)
-
gui/src/PatternEditor/PianoRollEditor.cpp (modified) (2 diffs)
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 423 423 uint h = m_nRowHeight - 2; 424 424 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() ); 430 426 431 427 if ( pNote->get_length() == -1 && pNote->get_noteoff() == false ) { 432 pPainter->setBrush( QColor( red,green,blue ));428 pPainter->setBrush( color ); 433 429 pPainter->drawEllipse( start_x -4 , start_y, w, h ); 434 430 } … … 444 440 nend = nend - 1; // lascio un piccolo spazio tra una nota ed un altra 445 441 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 ); 448 444 pPainter->drawRect( start_x, start_y, nend, h ); 449 445 }