1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 14:46:33 +02:00

* Fixed hovering of elided QueryLabels.

This commit is contained in:
Christian Muehlhaeuser
2011-01-14 19:37:20 +01:00
parent d4c82bf4f7
commit 77c38a0a9d

View File

@@ -292,8 +292,14 @@ QueryLabel::paintEvent( QPaintEvent* event )
p.save();
p.setRenderHint( QPainter::Antialiasing );
if ( elidedText == s && m_hoverArea.width() )
if ( m_hoverArea.width() )
{
if ( elidedText != s )
{
m_hoverArea.setLeft( 0 );
m_hoverArea.setRight( fontMetrics().width( elidedText ) + contentsMargins().left() * 2 );
}
p.setPen( palette().mid().color() );
p.setBrush( palette().highlight() );
p.drawRoundedRect( m_hoverArea, 4.0, 4.0 );