case SessionStart:
case RangeStart:
-
+
points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (6.5, 6.5));
frame_position = frame;
unit_position = editor.frame_to_unit (frame);
unit_position -= _shift;
-
- group = new Group (parent, unit_position, 1.0);
+
+ group = new Group (parent, unit_position, 0);
_name_background = new ArdourCanvas::SimpleRect (*group);
_name_background->property_outline_pixels() = 1;
Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */
int width;
- layout->set_font_description (*name_font);
+ layout->set_font_description (name_font);
Gtkmm2ext::get_ink_pixel_size (layout, width, name_height);
name_pixbuf = new ArdourCanvas::Pixbuf(*group);
_line->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
}
-
+
/* work out where to start the line from so that it extends from the top of the canvas */
double yo = 0;
double xo = 0;
Marker::setup_name_display ()
{
double limit = DBL_MAX;
-
+
if (label_on_left ()) {
limit = _left_label_limit;
} else {
}
/* Work out how wide the name can be */
- int name_width = min ((double) pixel_width (_name, *name_font) + 2, limit);
+ int name_width = min ((double) pixel_width (_name, name_font) + 2, limit);
if (name_width == 0) {
name_width = 1;
}
_name_background->property_x1() = name_pixbuf->property_x() - _label_offset + 2;
_name_background->property_x2() = name_pixbuf->property_x() + name_width;
}
-
+
_name_background->property_y1() = 0;
_name_background->property_y2() = 13;
}
Marker::show ()
{
_shown = true;
-
+
group->show ();
setup_line ();
}
Marker::hide ()
{
_shown = false;
-
+
group->hide ();
setup_line ();
}
if (_left_label_limit < 0) {
_left_label_limit = 0;
}
-
+
if (label_on_left ()) {
setup_name_display ();
}
if (_right_label_limit < 0) {
_right_label_limit = 0;
}
-
+
if (!label_on_left ()) {
setup_name_display ();
}