10import org.kde.kirigami.platform as Platform
49 required property string title
53 property string subtitle
60 property color color: selected ? Platform.Theme.highlightedTextColor : Platform.Theme.textColor
66 property color subtitleColor: selected
67 ? Platform.Theme.highlightedTextColor
68 : Platform.ColorUtils.linearInterpolation(color, Platform.Theme.backgroundColor, 0.3)
72 property font font: Platform.Theme.defaultFont
76 property font subtitleFont: Platform.Theme.smallFont
80 property int elide: Text.ElideRight
84 property int wrapMode: Text.NoWrap
88 property bool reserveSpaceForSubtitle: false
92 property bool selected: false
99 readonly property bool subtitleVisible: subtitle.length > 0 || reserveSpaceForSubtitle
103 readonly property bool truncated: labelItem.truncated || subtitleItem.truncated
108 signal linkActivated(string link)
113 signal linkHovered(string link)
115 implicitWidth: Math.max(labelItem.implicitWidth, subtitleItem.implicitWidth)
116 implicitHeight: labelItem.implicitHeight + (subtitleVisible ? subtitleItem.implicitHeight : 0)
124 verticalCenter: parent.verticalCenter
128 Accessible.ignored: true
134 wrapMode: root.wrapMode
136 onLinkActivated: link => root.linkActivated(link)
137 onLinkHovered: link => root.linkHovered(link)
142 horizontalAlignment: Text.AlignLeft
149 when: root.subtitle.length > 0
152 anchors.verticalCenter: undefined
153 anchors.bottom: subtitleItem.top
164 bottom: parent.bottom
168 color: root.subtitleColor
169 font: root.subtitleFont
171 wrapMode: root.wrapMode
173 visible: text.length > 0
175 onLinkActivated: link => root.linkActivated(link)
176 onLinkHovered: link => root.linkHovered(link)
181 horizontalAlignment: Text.AlignLeft
183 renderType: Text.NativeRendering
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:20 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.