last.fm often does not chops off last word of sone name

Bug #595120 reported by Aigars Mahinovs
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lastfm (Ubuntu)
New
Undecided
Unassigned
Nominated for Lucid by Aigars Mahinovs

Bug Description

Binary package hint: lastfm

When the title of the currently playing song (or the artist) contain multiple words very often the last word is not displayed in the detail pane. The title and artist are displayed in full in the progress bar and other places. When mousing over the title a shaded rectangle is shown which looks to be wide enough for the last word, but might be a few pixels short. It looks like the container width is too narrow for some texts and the last word gets word-wrapped to an invisible area.

The following patch from the latest version seems to fix this:

src/libUnicorn/draglabel.cpp : line 322

    // Augment to font height as this particular string might be less tall
    if ( fm.height() > rect.height() )
    {
        rect.setHeight( fm.height() );
    }

+ // Qt 4.6 seems to have problems with the width too
+ if ( fm.width( d.m_text ) > rect.width() )
+ {
+ rect.setWidth( fm.width( d.m_text ) );
+ }

    // boundingRect sometimes returns negative values so make sure it's at 0, 0
    rect.moveTo( 0, 0 );

Tags: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.