diff --git a/src/plugins/extensionmanager/extensionmanagerwidget.cpp b/src/plugins/extensionmanager/extensionmanagerwidget.cpp index 4550778270d..8bf7360fc80 100644 --- a/src/plugins/extensionmanager/extensionmanagerwidget.cpp +++ b/src/plugins/extensionmanager/extensionmanagerwidget.cpp @@ -147,7 +147,7 @@ public: static const TextFormat dlTF {Theme::Token_Text_Muted, vendorTF.uiElement}; static const TextFormat detailsTF - {Theme::Token_Text_Default, UiElementBody2}; + {titleTF.themeColor, Utils::StyleHelper::UiElementCaption}; m_title = tfLabel(titleTF); m_vendor = new Button({}, Button::SmallLink); @@ -229,14 +229,8 @@ public: m_dlCount->setText(QString::number(dlCount)); m_dlCountItems->setVisible(showDlCount); - const QStringList plugins = current.data(RolePlugins).toStringList(); - if (current.data(RoleItemType).toInt() == ItemTypePack) { - const int pluginsCount = plugins.count(); - const QString details = Tr::tr("Pack contains %n plugins.", nullptr, pluginsCount); - m_details->setText(details); - } else { - m_details->setText({}); - } + const QString description = current.data(RoleDescriptionShort).toString(); + m_details->setText(description); const ItemType itemType = current.data(RoleItemType).value(); const bool isPack = itemType == ItemTypePack; @@ -907,14 +901,8 @@ void ExtensionManagerWidget::updateView(const QModelIndex ¤t) m_currentId = current.data(RoleVendorId).toString() + "." + current.data(RoleId).toString(); { - const QStringList description = { - "# " + m_currentItemName, - current.data(RoleDescriptionShort).toString(), - "", - current.data(RoleDescriptionLong).toString() - }; - const QString descriptionMarkdown = description.join("\n"); - setMarkdown(m_description->document(), descriptionMarkdown); + const QString description = current.data(RoleDescriptionLong).toString(); + setMarkdown(m_description->document(), description); } { diff --git a/src/plugins/extensionmanager/extensionsbrowser.cpp b/src/plugins/extensionmanager/extensionsbrowser.cpp index f18bfc33aea..4e5b1ab85e8 100644 --- a/src/plugins/extensionmanager/extensionsbrowser.cpp +++ b/src/plugins/extensionmanager/extensionsbrowser.cpp @@ -181,8 +181,8 @@ public: Qt::AlignVCenter | Qt::TextDontClip}; constexpr static TextFormat stateTF {vendorTF.themeColor, UiElement::UiElementCaption, vendorTF.drawTextFlags}; - constexpr static TextFormat tagsTF - {Theme::Token_Text_Default, UiElement::UiElementCaption}; + constexpr static TextFormat descriptionTF + {itemNameTF.themeColor, UiElement::UiElementCaption}; explicit ExtensionItemDelegate(QObject *parent = nullptr) : QItemDelegate(parent) @@ -203,7 +203,7 @@ public: // | |(50x50)| +---------------------+--------+--------------+--------+--------+---------+---------+ | | // | | | | (VGapXxs) | | | // | | | +-----------------------------------------------------------------------------------+ | | - // | | | | | | | + // | | | | | | | // | | | +-----------------------------------------------------------------------------------+ | | // | | | | (ExPaddingGapL) | | | // +---------------+-------+---------------+-----------------------------------------------------------------------------------+---------------+---------+ @@ -244,9 +244,9 @@ public: QRect vendorR = vendorRowR; y += vendorRowR.height() + VGapXxs; - const QRect tagsR(x, y, middleColumnW, tagsTF.lineHeight()); + const QRect descriptionR(x, y, middleColumnW, descriptionTF.lineHeight()); - QTC_CHECK(option.rect.height() - 1 == tagsR.bottom() + ExPaddingGapL + gapSize); + QTC_CHECK(option.rect.height() - 1 == descriptionR.bottom() + ExPaddingGapL + gapSize); painter->save(); painter->setRenderHint(QPainter::Antialiasing); @@ -366,13 +366,12 @@ public: painter->drawText(vendorR, vendorTF.drawTextFlags, vendorElided); } { - const QStringList tagList = index.data(RoleTags).toStringList(); - const QString tags = tagList.join(", "); - painter->setPen(tagsTF.color()); - painter->setFont(tagsTF.font()); - const QString tagsElided - = painter->fontMetrics().elidedText(tags, Qt::ElideRight, tagsR.width()); - painter->drawText(tagsR, tagsTF.drawTextFlags, tagsElided); + const QString description = index.data(RoleDescriptionShort).toString(); + painter->setPen(descriptionTF.color()); + painter->setFont(descriptionTF.font()); + const QString descriptionElided = painter->fontMetrics() + .elidedText(description, Qt::ElideRight, descriptionR.width()); + painter->drawText(descriptionR, descriptionTF.drawTextFlags, descriptionElided); } painter->restore(); @@ -391,7 +390,7 @@ public: + VGapXxs + vendorRowHeight() + VGapXxs - + tagsTF.lineHeight(); + + descriptionTF.lineHeight(); const int height = ExPaddingGapL + qMax(iconBgSizeSmall.height(), middleColumnH)