summaryrefslogtreecommitdiff
path: root/gtk2_ardour/canvas-note-event.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-05-28 17:39:28 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-05-28 17:39:28 +0000
commit8932625869f181bc16833c9e9d253970656c180d (patch)
tree8558c8bb21baf4130cf39a3cc82f7dc50fb50dec /gtk2_ardour/canvas-note-event.cc
parent3e966771d042455a50a01e786af2af7b6f407395 (diff)
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
Diffstat (limited to 'gtk2_ardour/canvas-note-event.cc')
-rw-r--r--gtk2_ardour/canvas-note-event.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc
index 03130dd173..cd3fcffa8b 100644
--- a/gtk2_ardour/canvas-note-event.cc
+++ b/gtk2_ardour/canvas-note-event.cc
@@ -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;
}