diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-22 22:31:43 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-22 22:31:43 +0000 |
commit | 7d64d08fab70510565ab687bd8f8763e24bce087 (patch) | |
tree | 2a1115036d9c104e7170a9f8fa7d34d2dea14e11 /gtk2_ardour | |
parent | 0eadbc9396c1f4505ef0daf34f274c57daf63092 (diff) |
Bit of a hack: limit mix group names to 5 chars within the strip to stop them getting too wide.
git-svn-id: svn://localhost/ardour2/branches/3.0@5250 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 07e17159dc..6ba9c655d8 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1125,9 +1125,14 @@ MixerStrip::route_group_changed (void *ignored) ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::route_group_changed), ignored)); RouteGroup *rg = _route->route_group(); - + if (rg) { - group_label.set_text (rg->name()); + /* XXX: this needs a better algorithm */ + string truncated = rg->name (); + if (truncated.length () > 5) { + truncated = truncated.substr (0, 5); + } + group_label.set_text (truncated); } else { switch (_width) { case Wide: |