mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Fixed text-width calculation after my latest patch.
This commit is contained in:
@@ -80,11 +80,11 @@ JobStatusDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
|||||||
rightEdge = rRect.left();
|
rightEdge = rRect.left();
|
||||||
}
|
}
|
||||||
|
|
||||||
const int mainW = rightEdge - 3 * PADDING - iconRect.right();
|
const int mainW = rightEdge - 4 * PADDING - iconRect.right();
|
||||||
QString mainText = index.data( Qt::DisplayRole ).toString();
|
QString mainText = index.data( Qt::DisplayRole ).toString();
|
||||||
QTextOption to( Qt::AlignLeft | Qt::AlignVCenter );
|
QTextOption to( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
if ( !allowMultiLine )
|
if ( !allowMultiLine )
|
||||||
mainText = fm.elidedText( mainText, Qt::ElideRight, mainW );
|
mainText = fm.elidedText( mainText, Qt::ElideRight, mainW );
|
||||||
else
|
else
|
||||||
to.setWrapMode( QTextOption::WrapAtWordBoundaryOrAnywhere );
|
to.setWrapMode( QTextOption::WrapAtWordBoundaryOrAnywhere );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user