[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/context/applets/currenttrack
From:       Leo Franchi <lfranchi () kde ! org>
Date:       2009-03-31 20:45:10
Message-ID: 1238532310.169390.25887.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 947595 by lfranchi:

revert part of my previous commit that broke eliding

 M  +10 -0     CurrentTrack.cpp  


--- trunk/extragear/multimedia/amarok/src/context/applets/currenttrack/CurrentTrack.cpp \
#947594:947595 @@ -231,6 +231,16 @@
     
     m_title->setPos( m_artist->pos().x(), textY );
 
+    const QString title = m_currentInfo[ Meta::Field::TITLE ].toString();
+    const QString artist = m_currentInfo.contains( Meta::Field::ARTIST ) ? \
m_currentInfo[ Meta::Field::ARTIST ].toString() : QString(); +    const QString album \
= m_currentInfo.contains( Meta::Field::ALBUM ) ? m_currentInfo[ Meta::Field::ALBUM \
].toString() : QString(); +    const QString lastPlayed = m_currentInfo.contains( \
Meta::Field::LAST_PLAYED ) ? Amarok::conciseTimeSince( m_currentInfo[ \
Meta::Field::LAST_PLAYED ].toUInt() ) : QString(); +
+    m_artist->setText( truncateTextToFit( artist, m_artist->font(), QRectF( 0, 0, \
textWidth, 30 ) ) ); +    m_title->setText( truncateTextToFit( title, \
m_title->font(), QRectF( 0, 0, textWidth, 30 ) ) ); +    m_album->setText( \
truncateTextToFit( album, m_album->font(), QRectF( 0, 0, textWidth, 30 ) ) ); +
+
     if( !m_lastTracks.isEmpty() )
     {                
         m_tracksToShow = qMin( m_lastTracks.count(), ( int )( ( \
contentsRect().height() ) / ( textHeight ) ) );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic