change color of note velocity text (and don't set it or justification repeatedly); make pianoroll button2 clicks select correctly rather than always being additive; hide note velocity text as soon as the mouse moves. the color change will require remvoing ~/.config/ardour2/ardour3_ui.conf to become effective
git-svn-id: svn://localhost/ardour2/branches/3.0@7187 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3e966771d0
commit
8932625869
@ -59,7 +59,7 @@
|
||||
<Option name="midi note meter color mid" value="eeee33aa"/>
|
||||
<Option name="midi note meter color min" value="33ee33aa"/>
|
||||
<Option name="midi note selected" value="ff0000ff"/>
|
||||
<Option name="midi note velocity text" value="000000ff"/>
|
||||
<Option name="midi note velocity text" value="f4f214bc"/>
|
||||
<Option name="midi program change fill" value="0000ffa0"/>
|
||||
<Option name="midi program change outline" value="a7a7d4ff"/>
|
||||
<Option name="midi sysex fill" value="f1e139a0"/>
|
||||
|
@ -85,14 +85,15 @@ CanvasNoteEvent::show_velocity()
|
||||
{
|
||||
if (!_text) {
|
||||
_text = new NoEventText (*(_item->property_parent()));
|
||||
_text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiNoteVelocityText.get();
|
||||
_text->property_justification() = Gtk::JUSTIFY_CENTER;
|
||||
}
|
||||
|
||||
_text->property_x() = (x1() + x2()) /2;
|
||||
_text->property_y() = (y1() + y2()) /2;
|
||||
ostringstream velo(ios::ate);
|
||||
velo << int(_note->velocity());
|
||||
_text->property_text() = velo.str();
|
||||
_text->property_justification() = Gtk::JUSTIFY_CENTER;
|
||||
_text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiNoteVelocityText.get();
|
||||
_text->show();
|
||||
_text->raise_to_top();
|
||||
}
|
||||
@ -221,8 +222,6 @@ CanvasNoteEvent::base_color()
|
||||
bool
|
||||
CanvasNoteEvent::on_event(GdkEvent* ev)
|
||||
{
|
||||
cerr << "CNE: on_event type " << ev->type << endl;
|
||||
|
||||
if (!_region.get_time_axis_view().editor().internal_editing()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -953,7 +953,6 @@ Editor::canvas_note_event (GdkEvent *event, ArdourCanvas::Item* item)
|
||||
return false;
|
||||
}
|
||||
|
||||
cerr << "Forward note event item on to editor\n";
|
||||
return typed_event (item, event, NoteItem);
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,6 @@ MidiRegionView::enter_notify (GdkEventCrossing* ev)
|
||||
bool
|
||||
MidiRegionView::leave_notify (GdkEventCrossing* ev)
|
||||
{
|
||||
_mouse_state = None;
|
||||
trackview.editor().hide_verbose_canvas_cursor ();
|
||||
delete _ghost_note;
|
||||
_ghost_note = 0;
|
||||
@ -403,7 +402,13 @@ MidiRegionView::motion (GdkEventMotion* ev)
|
||||
if (_ghost_note) {
|
||||
update_ghost_note (ev->x, ev->y);
|
||||
}
|
||||
|
||||
/* any motion immediately hides velocity text that may have been visible */
|
||||
|
||||
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
|
||||
(*i)->hide_velocity ();
|
||||
}
|
||||
|
||||
switch (_mouse_state) {
|
||||
case Pressed: // Maybe start a drag, if we've moved a bit
|
||||
|
||||
@ -1678,6 +1683,10 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b
|
||||
MidiModel::Notes& notes (_model->notes());
|
||||
_optimization_iterator = _events.begin();
|
||||
|
||||
if (!add) {
|
||||
clear_selection ();
|
||||
}
|
||||
|
||||
if (extend && _selection.empty()) {
|
||||
extend = false;
|
||||
}
|
||||
@ -2512,7 +2521,10 @@ MidiRegionView::note_entered(ArdourCanvas::CanvasNoteEvent* ev)
|
||||
void
|
||||
MidiRegionView::note_left (ArdourCanvas::CanvasNoteEvent* note)
|
||||
{
|
||||
note->hide_velocity ();
|
||||
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
|
||||
(*i)->hide_velocity ();
|
||||
}
|
||||
|
||||
trackview.editor().hide_verbose_canvas_cursor ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user