mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
PluginListDelegate: Don't show version of plugin
It is still displayed in tooltip.
This commit is contained in:
parent
72b4cf55ff
commit
63cf3dbade
|
@ -89,19 +89,10 @@ void PluginListDelegate::paint(QPainter* painter, const QStyleOptionViewItem &op
|
|||
const QString name = index.data(Qt::DisplayRole).toString();
|
||||
const int leftTitleEdge = leftPosition + 2;
|
||||
const int rightTitleEdge = rightPosition - m_padding;
|
||||
const int leftPosForVersion = titleMetrics.width(name) + m_padding;
|
||||
QRect nameRect(leftTitleEdge, opt.rect.top() + m_padding, rightTitleEdge - leftTitleEdge, titleMetrics.height());
|
||||
painter->setFont(titleFont);
|
||||
style->drawItemText(painter, nameRect, Qt::AlignLeft, textPalette, true, name, colorRole);
|
||||
|
||||
// Draw version
|
||||
const QString version = index.data(Qt::UserRole).toString();
|
||||
QRect versionRect(nameRect.x() + leftPosForVersion, nameRect.y(), rightTitleEdge - leftPosForVersion, titleMetrics.height());
|
||||
QFont versionFont = titleFont;
|
||||
versionFont.setBold(false);
|
||||
painter->setFont(versionFont);
|
||||
style->drawItemText(painter, versionRect, Qt::AlignLeft, textPalette, true, version, colorRole);
|
||||
|
||||
// Draw description
|
||||
const int descriptionYPos = nameRect.bottom() + opt.fontMetrics.leading();
|
||||
QRect descriptionRect(nameRect.x(), descriptionYPos, nameRect.width(), opt.fontMetrics.height());
|
||||
|
|
Loading…
Reference in New Issue
Block a user