mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* Make ClickableLabel auto-elide.
This commit is contained in:
@@ -94,5 +94,7 @@ ClickableLabel::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
QPainter painter( this );
|
||||
painter.setOpacity( m_opacity );
|
||||
painter.drawText( contentsRect(), text() );
|
||||
|
||||
const QString elidedText = fontMetrics().elidedText( text(), Qt::ElideRight, contentsRect().width() );
|
||||
painter.drawText( contentsRect(), alignment(), elidedText );
|
||||
}
|
||||
|
Reference in New Issue
Block a user