6import QtQuick.Controls as QQC2
7import QtQuick.Templates as T
8import org.kde.kirigami as Kirigami
13 required property T.ItemDelegate itemDelegate
14 required property string subtitle
15 property bool bold: false
17 readonly property alias labelItem: labelItem
18 readonly property alias subtitleItem: subtitleItem
19 readonly property alias iconItem: iconItem
21 spacing: Kirigami.Units.smallSpacing
25 Layout.alignment: Qt.AlignVCenter
26 visible: itemDelegate.icon.name.length > 0 || itemDelegate.icon.source.toString().length > 0
27 source: itemDelegate.icon.name.length > 0 ? itemDelegate.icon.name : itemDelegate.icon.source
29 Layout.preferredHeight: itemDelegate.icon.width
30 Layout.preferredWidth: itemDelegate.icon.height
31 Layout.leftMargin: Kirigami.Units.smallSpacing
32 Layout.rightMargin: Kirigami.Units.smallSpacing
36 Layout.fillWidth: true
42 leftPadding: itemDelegate.mirrored ? (itemDelegate.indicator ? itemDelegate.indicator.width : 0) + itemDelegate.spacing : 0
43 rightPadding: !itemDelegate.mirrored ? (itemDelegate.indicator ? itemDelegate.indicator.width : 0) + itemDelegate.spacing : 0
45 text: itemDelegate.text
46 font: itemDelegate.font
47 color: itemDelegate.enabled ? Kirigami.Theme.textColor : Kirigami.Theme.disabledTextColor
48 elide: Text.ElideRight
49 visible: itemDelegate.text
50 horizontalAlignment: Text.AlignLeft
51 verticalAlignment: Text.AlignVCenter
53 Layout.fillWidth: true
54 Layout.alignment: subtitleItem.visible ? Qt.AlignLeft | Qt.AlignBottom : Qt.AlignLeft | Qt.AlignVCenter
60 color: itemDelegate.enabled ? Kirigami.Theme.textColor : Kirigami.Theme.disabledTextColor
63 elide: Text.ElideRight
64 font: Kirigami.Theme.smallFont
65 opacity: root.bold ? 0.9 : 0.7
66 visible: text.length > 0
68 Layout.fillWidth: true
69 Layout.alignment: visible ? Qt.AlignLeft | Qt.AlignTop : Qt.AlignLeft | Qt.AlignVCenter