mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Display properly elided text in progress.
This commit is contained in:
parent
c05adfd817
commit
c9e51dcfc1
1 changed files with 5 additions and 2 deletions
|
@ -280,7 +280,9 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
overallProgressRect.setLeft( pBRect.right()+margin);
|
||||
overallProgressRect.setWidth( progressTextWidth );
|
||||
painter->setFont(progressFont);
|
||||
painter->drawText( overallProgressRect, Qt::AlignRight+Qt::AlignVCenter, overallString);
|
||||
|
||||
QString elidedText = progressFm.elidedText(overallString, Qt::ElideLeft, overallProgressRect.width());
|
||||
painter->drawText( overallProgressRect, Qt::AlignRight+Qt::AlignVCenter, elidedText);
|
||||
|
||||
// Individual File Progress
|
||||
QRect fileRect;
|
||||
|
@ -288,8 +290,9 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
fileRect.setLeft( iconRect.left());
|
||||
fileRect.setWidth(overallWidth);
|
||||
fileRect.setHeight(fileNameTextHeight);
|
||||
elidedText = progressFm.elidedText(itemString, Qt::ElideLeft, fileRect.width());
|
||||
|
||||
painter->drawText( fileRect, Qt::AlignLeft+Qt::AlignVCenter, itemString);
|
||||
painter->drawText( fileRect, Qt::AlignLeft+Qt::AlignVCenter, elidedText);
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue