diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-20 13:41:55 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-20 13:41:55 +0000 |
commit | b895b677bf29cca95fe0626616d7495113386b04 (patch) | |
tree | 41f6e065356445cc769c797aa11e4226e0babe05 /gtk2_ardour/port_matrix_component.cc | |
parent | 379b19cfdc1c05d93249c902d9a8dd7e5a7737d8 (diff) |
Optional tabs down the LHS of the editor window to indicate edit group membership.
git-svn-id: svn://localhost/ardour2/branches/3.0@5220 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_component.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_component.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/gtk2_ardour/port_matrix_component.cc b/gtk2_ardour/port_matrix_component.cc index a68e21730d..3086e11e90 100644 --- a/gtk2_ardour/port_matrix_component.cc +++ b/gtk2_ardour/port_matrix_component.cc @@ -110,34 +110,3 @@ PortMatrixComponent::dimensions () return std::make_pair (_width, _height); } -std::pair<std::string, double> -PortMatrixComponent::display_port_name (cairo_t* cr, std::string const &n, double avail) const -{ - /* XXX hopefully there exists a more efficient way of doing this */ - - Glib::ustring name = Glib::ustring (n).uppercase (); - bool abbreviated = false; - uint32_t width = 0; - - while (1) { - if (name.length() <= 2) { - break; - } - - cairo_text_extents_t ext; - cairo_text_extents (cr, name.c_str(), &ext); - if (ext.width < avail) { - width = ext.width; - break; - } - - if (abbreviated) { - name = name.substr (0, name.length() - 2) + "."; - } else { - name = name.substr (0, name.length() - 1) + "."; - abbreviated = true; - } - } - - return std::make_pair (name, width); -} |