summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view_item.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-02 14:29:07 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-02 14:29:07 -0500
commit10c8b482357dcb23476b8f4b272e933917400268 (patch)
treeca7ea25a6ea3f0a90f6c885e08d1cd318a6e3852 /gtk2_ardour/time_axis_view_item.cc
parent6085d8c15cb3c5a746fe563323fb2df85eb2f752 (diff)
tweak design of time axis view item name text handling
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r--gtk2_ardour/time_axis_view_item.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 2617c26171..0b5acec217 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -80,10 +80,14 @@ TimeAxisViewItem::set_constant_heights ()
int height = 0;
layout->set_font_description (NAME_FONT);
- Gtkmm2ext::get_ink_pixel_size (layout, width, height);
+ get_pixel_size (layout, width, height);
+
+ layout = foo.create_pango_layout (X_("H")); /* just the ascender */
+
+ std::cerr << " height: " << height << " baseline = " << layout->get_baseline() / PANGO_SCALE << std::endl;
NAME_HEIGHT = height;
- NAME_Y_OFFSET = height * 1.5; // XXX this offset is magic
+ NAME_Y_OFFSET = height + 2;
NAME_HIGHLIGHT_SIZE = height + 2;
NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 3;
}
@@ -565,7 +569,7 @@ TimeAxisViewItem::set_height (double height)
manage_name_highlight ();
if (visibility & ShowNameText) {
- name_text->set_y_position (height + 1 - NAME_Y_OFFSET);
+ name_text->set_y_position (height - NAME_Y_OFFSET);
}
if (frame) {