Bug fix.
git-svn-id: svn://localhost/ardour2/branches/3.0@5238 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
49928d3fa3
commit
3be7176862
@ -122,17 +122,14 @@ fit_to_pixels (cairo_t* cr, std::string name, double avail)
|
||||
uint32_t width = 0;
|
||||
|
||||
while (1) {
|
||||
if (name.length() <= 4) {
|
||||
break;
|
||||
}
|
||||
|
||||
cairo_text_extents_t ext;
|
||||
cairo_text_extents (cr, name.c_str(), &ext);
|
||||
if (ext.width < avail) {
|
||||
|
||||
if (ext.width < avail || name.length() <= 4) {
|
||||
width = ext.width;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (abbreviated) {
|
||||
name = name.substr (0, name.length() - 4) + "...";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user