fixed elided label when size is too small to draw anything

This commit is contained in:
csoler 2020-02-18 11:07:41 +01:00
parent 09c5d93631
commit 61083ff77a
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
2 changed files with 6 additions and 2 deletions

View file

@ -200,7 +200,8 @@ bool ElidedLabel::paintElidedLine(QPainter& painter,QString plainText,const QRec
iTransX = 0;
}
painter.drawText(QPoint(iTransX + cr.left(), y + fontMetrics.ascent() + cr.top()), elidedLastLine);
if(width+iTransX+cr.left() <= cr.right())
painter.drawText(QPoint(iTransX + cr.left(), y + fontMetrics.ascent() + cr.top()), elidedLastLine);
//Draw button to get ToolTip
if(drawRoundRect)