change velocity bar inside notes to extend to edges of note

Multimedia / Ardour - Paul Davis [linuxaudiosystems.com] - 26 March 2020 16:12 UTC

Having the velocity bar inset from note causes distracting space at beginning of note when viewing a MIDI note that is zoomed out

###

diff --git a/libs/canvas/note.cc b/libs/canvas/note.cc
index 58431bdf6f..8b34caf1c8 100644
--- a/libs/canvas/note.cc
+++ b/libs/canvas/note.cc
@@ -78,8 +78,8 @@ Note::render (Rect const & area, Cairo::RefPtr context) const
self.y1 = self.y0 + center + 2;
self.y0 = self.y0 + center - 1;
const double width = (self.x1 - self.x0) - (2 * outline_width());
- self.x0 = self.x0 + outline_width()+1;
- self.x1 = self.x0 + ((width-2) * _velocity);
+ self.x0 = self.x0 + outline_width();
+ self.x1 = self.x0 + (width * _velocity);

const Rect draw = self.intersection (area);

f744b5fc12 change velocity bar inside notes to extend to edges of note
libs/canvas/note.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

  • Share