Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect
Commits
473b1f07
Commit
473b1f07
authored
Nov 16, 2020
by
Nicolas Fella
Browse files
[app] Improve plugin config delegates
Add description and make them more consistent with other list items in KDE.
parent
753b1a2b
Pipeline
#41222
canceled with stage
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/qml/PluginSettings.qml
View file @
473b1f07
...
...
@@ -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
}
}
}
...
...
interfaces/pluginmodel.cpp
View file @
473b1f07
...
...
@@ -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<int, QByteArray> PluginModel::roleNames() const
roles
[
IconRole
]
=
"iconName"
;
roles
[
IdRole
]
=
"pluginId"
;
roles
[
ConfigSourceRole
]
=
"configSource"
;
roles
[
DescriptionRole
]
=
"description"
;
return
roles
;
}
...
...
interfaces/pluginmodel.h
View file @
473b1f07
...
...
@@ -25,7 +25,8 @@ public:
enum
ExtraRoles
{
IconRole
=
Qt
::
UserRole
+
1
,
IdRole
,
ConfigSourceRole
ConfigSourceRole
,
DescriptionRole
,
};
Q_ENUM
(
ExtraRoles
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment