Index: gtk2_ardour/marker.h
===================================================================
--- gtk2_ardour/marker.h	(révision 3165)
+++ gtk2_ardour/marker.h	(copie de travail)
@@ -80,7 +80,6 @@
 	PublicEditor& editor;
 
 	ArdourCanvas::Group * _parent;
-	ArdourCanvas::Group *group;
 	ArdourCanvas::Polygon *mark;
 	ArdourCanvas::Text *text;
 	ArdourCanvas::Points *points;
@@ -91,7 +90,7 @@
 	nframes64_t   frame_position;
 	unsigned char shift; /* should be double, but its always small and integral */
 	Type         _type;
-	
+
 	void reposition ();
 };
 
Index: gtk2_ardour/marker.cc
===================================================================
--- gtk2_ardour/marker.cc	(révision 3165)
+++ gtk2_ardour/marker.cc	(copie de travail)
@@ -35,7 +35,6 @@
 	: editor (ed), _parent(&parent), _type(type)
 {
 	double label_offset = 0;
-	bool annotate_left = false;
 
 	/* Shapes we use:
 
@@ -139,7 +138,7 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));		
 		
 		shift = 3;
-		label_offset = 8.0;
+		label_offset = 4.0;
 		break;
 
 	case Tempo:
@@ -154,7 +153,7 @@
 		points->push_back (Gnome::Art::Point (3.0, 0.0));  		
 
 		shift = 3;
-		label_offset = 8.0;
+		label_offset = 4.0;
 		break;
 
 	case Start:
@@ -165,7 +164,7 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));	
 
 		shift = 0;
-		label_offset = 13.0;
+		label_offset = 7.5;
 		break;
 
 	case End:
@@ -176,8 +175,7 @@
 		points->push_back (Gnome::Art::Point (6.5, 6.5));		
 		
 		shift = 13;
-		label_offset = 6.0;
-		annotate_left = true;
+		label_offset = -7.5;
 		break;
 
 	case LoopStart:
@@ -188,7 +186,7 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));		
 		
 		shift = 0;
-		label_offset = 12.0;
+		label_offset = 14.0;
 		break;
 
 	case LoopEnd:
@@ -199,8 +197,7 @@
 		points->push_back (Gnome::Art::Point (13.0, 0.0));
 		
 		shift = 13;
-		label_offset = 0.0;
-		annotate_left = true;
+		label_offset = -1.0;
 		break;
 
 	case  PunchIn:
@@ -211,19 +208,18 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));	
 
 		shift = 0;
-		label_offset = 13.0;
+		label_offset = 14.0;
 		break;
 		
 	case  PunchOut:
 		points = new ArdourCanvas::Points ();
 		points->push_back (Gnome::Art::Point (0.0, 0.0));
-		points->push_back (Gnome::Art::Point (12.0, 0.0));			
-		points->push_back (Gnome::Art::Point (12.0, 12.0));		
+		points->push_back (Gnome::Art::Point (13.0, 0.0));			
+		points->push_back (Gnome::Art::Point (13.0, 13.0));		
 		points->push_back (Gnome::Art::Point (0.0, 0.0));		
 
 		shift = 13;
-		label_offset = 0.0;
-		annotate_left = true;
+		label_offset = -0.0;
 		break;
 		
 	}
@@ -233,38 +229,34 @@
 
 	/* adjust to properly locate the tip */
 
-	unit_position -= shift;
+	text = new Text (parent);
+	text->lower_to_bottom();
+	text->raise(1);
+	text->property_anchor() = Gtk::ANCHOR_NW;
+	text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
+	text->property_text() = "";
+	text->move (unit_position + label_offset, 0.0);
 
-	group = new Group (parent, unit_position, 1.0);
+	Pango::FontDescription* font = get_font_for_style (N_("MarkerText"));
+	text->property_font_desc() = *font;
+	delete font;	
 
-	mark = new Polygon (*group);
+	set_name(annotation.c_str());
+
+	mark = new Polygon (parent);
+	mark->move(unit_position - shift, 1.0);
 	mark->property_points() = *points;
 	mark->property_fill_color_rgba() = rgba;
 	mark->property_outline_color_rgba() = rgba;
 	mark->property_width_pixels() = 1;
-	Pango::FontDescription* font = get_font_for_style (N_("MarkerText"));
+	mark->raise_to_top();
 
-	text = new Text (*group);
-	text->property_text() = annotation.c_str();
-	text->property_font_desc() = *font;
-
-	delete font;
-	
-	if (annotate_left) {
-		text->property_x() = -(text->property_text_width());
-	} else {
-		text->property_x() = label_offset;
-	}
-	text->property_y() = 0.0;
-	text->property_anchor() = Gtk::ANCHOR_NW;
-	text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
-
 	editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
 
 	mark->set_data ("marker", this);
 
 	if (handle_events) {
-		group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+		mark->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
 	}
 
 	line = 0;
@@ -276,7 +268,6 @@
 {
 	drop_references ();
 
-	/* destroying the parent group destroys its contents, namely any polygons etc. that we added */
 	delete text;
 	delete mark;
 	delete points;
@@ -289,7 +280,6 @@
 
 void Marker::reparent(ArdourCanvas::Group & parent)
 {
-	group->reparent(parent);
 	_parent = &parent;
 }
 
@@ -310,9 +300,9 @@
 
 		line = new ArdourCanvas::SimpleLine (*group);
 		line->property_color_rgba() = ARDOUR_UI::config()->canvasvar_EditPoint.get();
-		line->property_x1() = unit_position + shift;
+		line->property_x1() = unit_position;
 		line->property_y1() = y_origin;
-		line->property_x2() = unit_position + shift;
+		line->property_x2() = unit_position;
 		line->property_y2() = y_origin + initial_height;
 
 		line->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
@@ -347,9 +337,13 @@
 void
 Marker::set_name (const string& name)
 {
+	double old_width = text->property_text_width();
 	text->property_text() = name.c_str();
-	if (_type == End) {
-	  text->property_x() = -(text->property_text_width());
+
+	bool annotate_left = ((_type == End) || (_type == LoopEnd) || (_type == PunchOut));
+
+	if (annotate_left) {
+		text->move(old_width - text->property_text_width(), 0.0);
 	}
 }
 
@@ -357,14 +351,14 @@
 Marker::set_position (nframes_t frame)
 {
 	double new_unit_position = editor.frame_to_unit (frame);
-	new_unit_position -= shift;
-	group->move (new_unit_position - unit_position, 0.0);
+	mark->move (new_unit_position - unit_position, 0.0);
+	text->move (new_unit_position - unit_position, 0.0);
 	frame_position = frame;
 	unit_position = new_unit_position;
 
 	if (line) {
-		line->property_x1() = unit_position + shift;
-		line->property_x2() = unit_position + shift;
+		line->property_x1() = unit_position;
+		line->property_x2() = unit_position;
 	}
 }
 
@@ -377,13 +371,15 @@
 void
 Marker::show ()
 {
-        group->show();
+	mark->show();
+	text->show();
 }
 
 void
 Marker::hide ()
 {
-	group->hide();
+	mark->hide();
+	text->hide();
 }
 
 void
@@ -401,7 +397,8 @@
 	  _tempo (temp)
 {
 	set_position (_tempo.frame());
-	group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
+	mark->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
+
 }
 
 TempoMarker::~TempoMarker ()
@@ -416,7 +413,8 @@
 	  _meter (m)
 {
 	set_position (_meter.frame());
-	group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
+	mark->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
+
 }
 
 MeterMarker::~MeterMarker ()
