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

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/widgets
From:       Seb Ruiz <ruiz () kde ! org>
Date:       2009-06-15 9:59:45
Message-ID: 1245059985.474686.17199.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 982207 by seb:

Add a tooltip to elided buttons
BUG: 196382

 M  +8 -0      ElidingButton.cpp  


--- trunk/extragear/multimedia/amarok/src/widgets/ElidingButton.cpp #982206:982207
@@ -104,6 +104,14 @@
 
     bool elided = ( elidedText != m_fullText );
 
+    // If there is no tooltip set, then we set it to be the full text when elided,
+    // and clear it if the button is no longer elided.
+    const QString tip = toolTip();
+    if( elided && tip.isEmpty() )
+        setToolTip( m_fullText );
+    else if( !elided && tip == m_fullText )
+        setToolTip( QString() );
+
     if ( m_isElided )
         setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
     else
[prev in list] [next in list] [prev in thread] [next in thread] 

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