mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Vertically align Midi Notes, Piano Roll & Canvas Line Grid
This commit is contained in:
parent
a649fa8572
commit
1f313ec19c
3 changed files with 14 additions and 14 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue