/*SPDX-FileCopyrightText: 2015 Eike Hein <hein@kde.org>SPDX-License-Identifier: GPL-2.0-or-later*/import QtQuickimport QtQuick.Layoutsimport org.kde.kirigami as Kirigamiimport org.kde.plasma.components as PlasmaComponents3ItemAbstractDelegate {id: itemproperty alias iconSize: icon.implicitWidthproperty bool showLabel: trueproperty int itemIndex: item.indexproperty var m: modelwidth: GridView.view.cellWidthheight: widthenabled: !item.disabledfavoritesModel: GridView.view.model.favoritesModelbaseModel: GridView.view.modelAccessible.role: Accessible.MenuItemAccessible.name: model.display ?? ""onClicked: {item.baseModel.trigger(index, "", null);item.interactionConcluded()}Keys.onReturnPressed: item.clicked()Keys.onEnterPressed: Keys.returnPressed()background.visible: false // we want the default background's spacing, but not the base colorcontentItem: ColumnLayout {spacing: Kirigami.Units.smallSpacingKirigami.Icon {id: iconLayout.alignment: Qt.AlignHCenter | Qt.AlignBottomimplicitHeight: widthanimated: falsesource: item.decoration}PlasmaComponents3.Label {id: labelvisible: item.showLabelLayout.fillWidth: trueLayout.preferredHeight: label.lineCount === 1 ? label.implicitHeight * 2 : label.implicitHeighthorizontalAlignment: Text.AlignHCentermaximumLineCount: 2elide: Text.ElideMiddlewrapMode: Text.Wraptext: item.model.display ?? ""textFormat: Text.PlainText}}PlasmaComponents3.ToolTip {text: item.model.description ?? ""visible: item.hovered}}