Obey snap setting for MIDI stuff.
[ardour.git] / gtk2_ardour / marker.cc
index 918a2786c9fffafd3c30f1f81eae6b12f9df2e0b..a0f91d2a2a37709b70b8ec7a49e371a1fc08448e 100644 (file)
 #include "public_editor.h"
 #include "utils.h"
 #include "canvas_impl.h"
+#include "ardour_ui.h"
 
 #include "i18n.h"
 
+using namespace ARDOUR;
+
 Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation, 
                Type type, nframes_t frame, bool handle_events)
 
@@ -240,11 +243,14 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
        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"));
+       Pango::FontDescription* font = get_font_for_style (N_("MarkerText"));
        
        text = new Text (*group);
        text->property_text() = annotation.c_str();
-       text->property_font_desc() = font;
+       text->property_font_desc() = *font;
+
+       delete font;
+       
        if (annotate_left) {
          text->property_x() = -(text->property_text_width());
        } else {
@@ -252,7 +258,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
        }
        text->property_y() = 0.0;
        text->property_anchor() = Gtk::ANCHOR_NW;
-       text->property_fill_color() = "black";
+       text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
 
        editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));