aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/extensionmanager/extensionmanagerwidget.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <[email protected]>2024-10-14 15:01:54 +0200
committerAlessandro Portale <[email protected]>2024-10-14 14:48:37 +0000
commit1dc7d69e25d43d4708c70c2ea38594cacbe281ac (patch)
treef0cfb477612c8b891817f8b901829c41fd3b67fc /src/plugins/extensionmanager/extensionmanagerwidget.cpp
parent9f08d874b6b3081d8708b884e6082397eb02f872 (diff)
ExtensionManager: Change position of the short description
The short description is currently shown as initial part of the description, followed by the long description. With this change, the long description is shown by its own. And the short description moves to other places: on the bottom of the card (replacing the tags) and on the bottom of the details-top element. Fixes: QTCREATORBUG-31813 Change-Id: I927573b9699ad830896fdebec4077aadf2df7b9e Reviewed-by: Marcus Tillmanns <[email protected]>
Diffstat (limited to 'src/plugins/extensionmanager/extensionmanagerwidget.cpp')
-rw-r--r--src/plugins/extensionmanager/extensionmanagerwidget.cpp22
1 files changed, 5 insertions, 17 deletions
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<ItemType>();
const bool isPack = itemType == ItemTypePack;
@@ -907,14 +901,8 @@ void ExtensionManagerWidget::updateView(const QModelIndex &current)
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);
}
{