summaryrefslogtreecommitdiff
path: root/libs/canvas
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-07-08 07:12:12 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2018-07-08 07:12:12 -0400
commit8664768efa99c9186a99e2487581e0107d431833 (patch)
tree0d69a2ba6687114e18b9da1ec7e3969760b8e9a4 /libs/canvas
parent8004b9bb8ed296a3785a97a8dfda86183736c2c7 (diff)
make velocity bars thinner (from alex mitchell)
Diffstat (limited to 'libs/canvas')
-rw-r--r--libs/canvas/note.cc10
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);