summaryrefslogtreecommitdiff
path: root/gtk2_ardour/piano_roll_header.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-09-08 18:44:32 +0200
committerRobin Gareus <robin@gareus.org>2014-09-08 18:44:32 +0200
commit1f313ec19c4c60de8ce4288c98f2632ee78fbcdc (patch)
treee1cde3077d92fa7d3bd1c8abc5811975ffcc2242 /gtk2_ardour/piano_roll_header.cc
parenta649fa85723ac0c6aa8724d1cb8cfef19e5c201e (diff)
Vertically align Midi Notes, Piano Roll & Canvas Line Grid
Diffstat (limited to 'gtk2_ardour/piano_roll_header.cc')
-rw-r--r--gtk2_ardour/piano_roll_header.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/piano_roll_header.cc b/gtk2_ardour/piano_roll_header.cc
index e784242ff1..878cbb72d8 100644
--- a/gtk2_ardour/piano_roll_header.cc
+++ b/gtk2_ardour/piano_roll_header.cc
@@ -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) {