From 94fd0b39e0fc25d2b738521df252fd87275551ff Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 22 Sep 2014 12:03:30 -0400 Subject: [PATCH] fix position of left edge of a marker rectangle when the label is on the left, and slightly pad the rectangle when the label is on the right --- gtk2_ardour/marker.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index af201286a9..671085a7e3 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -408,11 +408,14 @@ Marker::setup_name_display () _name_item->set (_name); if (label_on_left ()) { + /* adjust right edge of background to fit text */ _name_background->set_x0 (_name_item->position().x - 2); _name_background->set_x1 (_name_item->position().x + name_width + _shift); } else { - _name_background->set_x0 (_name_item->position().x - _label_offset + 2); - _name_background->set_x1 (_name_item->position().x + name_width); + /* right edge remains at zero (group-relative). Add + * arbitrary 4 pixels of extra padding at the end + */ + _name_background->set_x1 (_name_item->position().x + name_width + 4.0); } }