9import QtQuick.Templates as T
10import org.kde.kirigami as Kirigami
11import org.kde.ksvg as KSvg
12import "private" as Private
17 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
18 implicitContentWidth + leftPadding + rightPadding,
19 implicitIndicatorWidth + leftPadding + rightPadding)
20 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
21 implicitContentHeight + topPadding + bottomPadding,
22 implicitIndicatorHeight + topPadding + bottomPadding)
24 baselineOffset: contentItem.y + contentItem.baselineOffset
30 bottomPadding: (background as
KSvg.
FrameSvgItem)?.margins.bottom ?? undefined
34 icon.width:
Kirigami.Units.iconSizes.sizeForLabels
35 icon.height:
Kirigami.Units.iconSizes.sizeForLabels
37 contentItem: Private.IconLabel {
38 readonly
property int effectiveIndicatorWidth: control.indicator && control.indicator.visible && control.indicator.width > 0
39 ? control.indicator.width + control.spacing : 0
41 mirrored: control.mirrored
42 leftPadding: !control.mirrored ? 0 : effectiveIndicatorWidth
43 rightPadding: control.mirrored ? 0 : effectiveIndicatorWidth
46 alignment:
Qt.AlignLeft
47 display: control.display
48 spacing: control.spacing
49 iconItem.implicitWidth: control.icon.width
50 iconItem.implicitHeight: control.icon.height
51 iconItem.source: control.icon.name || control.icon.source
52 label.text: control.text
56 x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
57 y: control.topPadding + Math.round((control.availableHeight - height) / 2)
62 background: Private.DefaultListItemBackground {
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:35 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.