Fix marker text vertical alignment
This commit is contained in:
@@ -760,7 +760,7 @@ Editor::setup_ruler_new (Gtk::HBox& box, Gtk::Label* rlbl)
|
||||
{
|
||||
rlbl->set_name ("EditorRulerLabel");
|
||||
rlbl->set_size_request (-1, (int)timebar_height);
|
||||
rlbl->set_alignment (1.0, 0);
|
||||
rlbl->set_alignment (1.0, 0.5);
|
||||
rlbl->show ();
|
||||
|
||||
Gtk::Table* rtbl = manage (new Gtk::Table);
|
||||
|
||||
@@ -375,10 +375,11 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
|
||||
_name_item->set_font_description (name_font);
|
||||
_name_item->set_color (RGBA_TO_UINT (0,0,0,255));
|
||||
|
||||
if (_type==Section) {
|
||||
_name_item->set_position (ArdourCanvas::Duple (_label_offset, floor (.5 * (name_height - name_height))));
|
||||
if (_type == Section) {
|
||||
_name_item->set_position (ArdourCanvas::Duple (_label_offset, 1 + floor (.5 * (marker_height - name_descent))));
|
||||
} else {
|
||||
_name_item->set_position (ArdourCanvas::Duple (_label_offset, floor (.5 * (name_height - name_descent - .5))));
|
||||
const double padding = std::max (2., rint (2. * scale));
|
||||
_name_item->set_position (ArdourCanvas::Duple (_label_offset, 1 + floor (.5 * (marker_height - name_descent)) - padding));
|
||||
}
|
||||
|
||||
apply_color ();
|
||||
|
||||
Reference in New Issue
Block a user