diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-07-08 07:12:12 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-07-08 07:12:12 -0400 |
commit | 8664768efa99c9186a99e2487581e0107d431833 (patch) | |
tree | 0d69a2ba6687114e18b9da1ec7e3969760b8e9a4 | |
parent | 8004b9bb8ed296a3785a97a8dfda86183736c2c7 (diff) |
make velocity bars thinner (from alex mitchell)
-rw-r--r-- | libs/canvas/note.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/canvas/note.cc b/libs/canvas/note.cc index 05c66afd4e..653fe1f1c1 100644 --- a/libs/canvas/note.cc +++ b/libs/canvas/note.cc @@ -74,12 +74,12 @@ Note::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const outline_width() margin on left. set width based on velocity. */ - - self.y0 = self.y0 + outline_width() + 2; - self.y1 = self.y1 - outline_width() - 1; + const double center = (self.y1 - self.y0) * 0.5; + 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(); - self.x1 = self.x0 + (width * _velocity); + self.x0 = self.x0 + outline_width()+1; + self.x1 = self.x0 + ((width-2) * _velocity); const Rect draw = self.intersection (area); |