forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/7.0'
Conflicts: src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp Change-Id: Icda34067bb89d066a3e7eb47f8cca1d62dc3ae0d
This commit is contained in:
@@ -525,11 +525,14 @@ void ListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||
|
||||
painter->setPen(themeColor(Theme::Welcome_LinkColor));
|
||||
m_currentTagRects.clear();
|
||||
int emptyTagRowsLeft = 2;
|
||||
int xx = 0;
|
||||
int yy = 0;
|
||||
for (const QString &tag : item->tags) {
|
||||
const int ww = fm.horizontalAdvance(tag) + tagsHorSpacing;
|
||||
if (xx + ww > textArea.width() - tagsLabelRect.width()) {
|
||||
if (--emptyTagRowsLeft == 0)
|
||||
break;
|
||||
yy += fm.lineSpacing();
|
||||
xx = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user