Fix mismatched note resize drag cursor and behaviour.
[ardour.git] / gtk2_ardour / piano_roll_header.cc
index e784242ff1247319ab2bf0e56f641d466b262ccb..878cbb72d876e1d815857ea7946dbe170ec27f15 100644 (file)
@@ -174,16 +174,16 @@ render_dga(Cairo::RefPtr<Cairo::Context> cr, int /*note*/, double x[], double y[
 void
 PianoRollHeader::get_path(PianoRollHeader::ItemType note_type, int note, double x[], double y[])
 {
-       double y_pos = floor(_view.note_to_y(note)) - 0.5f;
+       double y_pos = floor(_view.note_to_y(note)) + 1.5f;
        double note_height;
-       double other_y1 = floor(_view.note_to_y(note+1)) + floor(_note_height / 2.0f) + 0.5f;
-       double other_y2 = floor(_view.note_to_y(note-1)) + floor(_note_height / 2.0f) - 1.0f;
+       double other_y1 = floor(_view.note_to_y(note+1)) + floor(_note_height / 2.0f) + 2.5f;
+       double other_y2 = floor(_view.note_to_y(note-1)) + floor(_note_height / 2.0f) + 1.0f;
        double width = get_width();
 
        if (note == 0) {
-               note_height = floor(_view.contents_height()) - y_pos;
+               note_height = floor(_view.contents_height()) - y_pos + 2.;
        } else {
-               note_height = floor(_view.note_to_y(note - 1)) - y_pos;
+               note_height = floor(_view.note_to_y(note - 1)) - y_pos + 2.;
        }
 
        switch (note_type) {