9import QtQuick.Templates as T
10import org.kde.kirigami as Kirigami
11import "private" as Private
16 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
17 implicitContentWidth + leftPadding + rightPadding,
18 implicitIndicatorWidth + leftPadding + rightPadding)
19 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
20 implicitContentHeight + topPadding + bottomPadding,
21 implicitIndicatorHeight + topPadding + bottomPadding)
23 baselineOffset: contentItem.y + contentItem.baselineOffset
28 icon.width:
Kirigami.Units.iconSizes.sizeForLabels
29 icon.height:
Kirigami.Units.iconSizes.sizeForLabels
32 x: (control.text || control.icon.name || control.icon.source)
33 ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding)
34 : control.leftPadding + Math.round((control.availableWidth - width) / 2)
35 y: control.topPadding + Math.round((control.availableHeight - height) / 2)
40 contentItem: Private.IconLabel {
41 readonly
property int effectiveIndicatorWidth: control.indicator && control.indicator.visible && control.indicator.width > 0
42 ? control.indicator.width + control.spacing : 0
44 mirrored: control.mirrored
45 leftPadding: !control.mirrored ? effectiveIndicatorWidth : 0
46 rightPadding: control.mirrored ? effectiveIndicatorWidth : 0
49 alignment:
Qt.AlignLeft |
Qt.AlignVCenter
50 display: control.display
51 spacing: control.spacing
52 iconItem.implicitWidth: control.icon.width
53 iconItem.implicitHeight: control.icon.height
54 iconItem.source: control.icon.name || control.icon.source
55 label.text: control.text
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.