summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-09-22 12:03:30 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-09-22 12:03:30 -0400
commit94fd0b39e0fc25d2b738521df252fd87275551ff (patch)
treeaafa7841b0f71bcaa4371461bc5610afb0407997 /gtk2_ardour
parent2e2390d0534f765281f67bae9c619f220687244c (diff)
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
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/marker.cc7
1 files 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);
}
}