Commit bd9e9a4b authored by Nicolas Fella's avatar Nicolas Fella Committed by Bhushan Shah

Use Kirigami.BasicListItem with subtitle

Looks virtually the same, but with less code
parent f1054a49
Pipeline #27069 failed with stage
in 6 minutes and 25 seconds
......@@ -38,40 +38,14 @@ Kirigami.ScrollablePage {
Component {
id: settingsModuleDelegate
Kirigami.AbstractListItem {
Kirigami.BasicListItem {
id: delegateItem
enabled: true
icon: model.iconName
iconSize: Kirigami.Units.iconSizes.medium
text: model.name
subtitle: model.description
checked: listView.currentIndex == index && !rootItem.compactMode
leftPadding: Kirigami.Units.largeSpacing
RowLayout {
id: bah
spacing: Kirigami.Units.largeSpacing
Kirigami.Icon {
id: iconItem
selected: delegateItem.down
Layout.maximumWidth: Layout.preferredWidth
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
Layout.preferredHeight: Layout.preferredWidth
source: iconName
}
ColumnLayout {
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Controls.Label {
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
text: name
}
Controls.Label {
text: description
Layout.fillWidth: true
font.pointSize: Kirigami.Theme.defaultFont.pointSize -1
opacity: 0.6
elide: Text.ElideRight
}
}
}
onClicked: {
print("Clicked index: " + index + " current: " + listView.currentIndex + " " + name + " curr: " + rootItem.currentModule);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment