changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)
[ardour.git] / gtk2_ardour / marker.cc
index f4848228f8286ac13e89263ffea60d2e92069fbd..f0f8068e8b86f19df4fb84882c3cf877f8cadebb 100644 (file)
@@ -255,20 +255,17 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
        /* setup name pixbuf sizes */
        name_font = get_font_for_style (N_("MarkerText"));
 
-       Gtk::Window win;
        Gtk::Label foo;
-       win.add (foo);
 
        Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */
        int width;
-       int height;
 
        layout->set_font_description (*name_font);
-       Gtkmm2ext::get_ink_pixel_size (layout, width, height);
-       name_height = height + 6;
+       Gtkmm2ext::get_ink_pixel_size (layout, width, name_height);
 
        name_pixbuf = new ArdourCanvas::Pixbuf(*group);
        name_pixbuf->property_x() = label_offset;
+       name_pixbuf->property_y() = (13/2) - (name_height/2);
 
        set_name (annotation.c_str());