/* SPDX-FileCopyrightText: 2016 Marco Martin SPDX-FileCopyrightText: 2022-2024 ivan (@ratijas) tkachenko SPDX-License-Identifier: LGPL-2.0-or-later */ import QtQuick import QtQuick.Templates as T import org.kde.kirigami as Kirigami import org.kde.ksvg as KSvg import "private" as Private T.ItemDelegate { id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding, implicitIndicatorWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset hoverEnabled: true topPadding: (background as KSvg.FrameSvgItem)?.margins.top ?? undefined leftPadding: (background as KSvg.FrameSvgItem)?.margins.left ?? undefined rightPadding: (background as KSvg.FrameSvgItem)?.margins.right ?? undefined bottomPadding: (background as KSvg.FrameSvgItem)?.margins.bottom ?? undefined spacing: Kirigami.Units.smallSpacing icon.width: Kirigami.Units.iconSizes.sizeForLabels icon.height: Kirigami.Units.iconSizes.sizeForLabels contentItem: Private.IconLabel { mirrored: control.mirrored font: control.font alignment: Qt.AlignLeft display: control.display spacing: control.spacing iconItem.implicitWidth: control.icon.width iconItem.implicitHeight: control.icon.height iconItem.source: control.icon.name || control.icon.source label.text: control.text } background: Private.DefaultListItemBackground { control: control } }