diff --git a/app/qml/PluginSettings.qml b/app/qml/PluginSettings.qml index 5914e7078..0efab9a37 100644 --- a/app/qml/PluginSettings.qml +++ b/app/qml/PluginSettings.qml @@ -25,11 +25,34 @@ Kirigami.ScrollablePage delegate: Kirigami.SwipeListItem { - CheckBox { - checked: isChecked - text: name - onClicked: { - isChecked = checked + RowLayout { + CheckBox { + id: serviceCheck + Layout.alignment: Qt.AlignVCenter + checked: model.isChecked + onToggled: model.isChecked = checked + } + + ColumnLayout { + spacing: 0 + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter + + Label { + Layout.fillWidth: true + text: model.name + color: listItem.pressed ? listItem.activeTextColor : listItem.textColor + elide: Text.ElideRight + } + + Label { + Layout.fillWidth: true + text: model.description + color: listItem.pressed ? listItem.activeTextColor : listItem.textColor + elide: Text.ElideRight + font: Kirigami.Theme.smallFont + opacity: 0.7 + } } } diff --git a/interfaces/pluginmodel.cpp b/interfaces/pluginmodel.cpp index d884743c9..9c120e0d1 100644 --- a/interfaces/pluginmodel.cpp +++ b/interfaces/pluginmodel.cpp @@ -68,6 +68,8 @@ QVariant PluginModel::data(const QModelIndex &index, int role) const return QUrl::fromLocalFile(configFile); } + case DescriptionRole: + return pluginEntry.description(); default: return QVariant(); } @@ -82,6 +84,7 @@ QHash PluginModel::roleNames() const roles[IconRole] = "iconName"; roles[IdRole] = "pluginId"; roles[ConfigSourceRole] = "configSource"; + roles[DescriptionRole] = "description"; return roles; } diff --git a/interfaces/pluginmodel.h b/interfaces/pluginmodel.h index a7543c3b5..6c4e7fa93 100644 --- a/interfaces/pluginmodel.h +++ b/interfaces/pluginmodel.h @@ -25,7 +25,8 @@ public: enum ExtraRoles { IconRole = Qt::UserRole + 1, IdRole, - ConfigSourceRole + ConfigSourceRole, + DescriptionRole, }; Q_ENUM(ExtraRoles)