/*SPDX-FileCopyrightText: 2013-2015 Eike Hein <hein@kde.org>SPDX-License-Identifier: GPL-2.0-or-later*/pragma ComponentBehavior: Boundimport QtQuickimport org.kde.kirigami as Kirigamiimport org.kde.plasma.components as PC3import org.kde.plasma.extras as PlasmaExtrasimport org.kde.ksvg as KSvgItemAbstractDelegate {id: itemreadonly property int itemIndex: model.indexreadonly property bool isDropPlaceHolder: "dropPlaceholderIndex" in item.baseModel && item.itemIndex === item.baseModel.dropPlaceholderIndexproperty bool showUnfavoritePlaceholder: falseAccessible.role: Accessible.ListItemicon.source: item.decorationicon.width: Kirigami.Units.iconSizes.mediumicon.height: Kirigami.Units.iconSizes.mediumhoverEnabled: truedragActive: dragHandler.activeKeys.onSpacePressed: action.trigger()background.visible: false // we want the default background's spacing, but not the base colorcontentItem: Kirigami.Icon {visible: !item.showUnfavoritePlaceholder && !item.isDropPlaceHolderactive: item.hoveredwidth: item.icon.widthheight: item.icon.heightsource: item.icon.source}Loader {active: item.hovered || item.visualFocus || dragHandler.active || item.isDropPlaceHolder || item.showUnfavoritePlaceholderanchors.fill: parentsourceComponent: Item {id: highlightItemanchors.fill: parentPlasmaExtras.Highlight {anchors.fill: parentvisible: !item.isDropPlaceHolder && !item.showUnfavoritePlaceholderhovered: truepressed: item.pressed}KSvg.FrameSvgItem {anchors.fill: parentvisible: item.isDropPlaceHolder || item.showUnfavoritePlaceholderimagePath: "widgets/viewitem"prefix: "selected"opacity: 0.5Kirigami.Icon {anchors.centerIn: parentwidth: item.icon.widthheight: widthsource: item.isDropPlaceHolder ? "list-add" : "list-remove"active: false}}}}DragHandler {id: dragHandlertarget: nullonActiveChanged: if (active) {item.contentItem.grabToImage(function(result) {item.Drag.imageSource = result.urlitem.Drag.active = true // using a binding can cause loop warnings when unexpanding})} else {item.Drag.active = false}}Drag.dragType: Drag.AutomaticDrag.mimeData: {'favoritedrag': '',"text/uri-list" : [item.url]}PC3.ToolTip {text: item.text}}