2019-07-21 22:33:52 +02:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
|
|
|
|
Item {
|
|
|
|
property alias iconSource: iconItem.source
|
|
|
|
property alias iconOpacity: iconItem.opacity
|
|
|
|
property alias text: label.text
|
|
|
|
property alias tooltip: tooltipTrigger.tooltip
|
|
|
|
|
2019-08-08 21:51:27 +02:00
|
|
|
implicitWidth: layout.implicitWidth
|
|
|
|
implicitHeight: layout.implicitHeight
|
2019-07-21 22:33:52 +02:00
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: layout
|
|
|
|
|
|
|
|
PlasmaCore.IconItem {
|
|
|
|
id: iconItem
|
2020-01-29 18:52:25 +01:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
|
|
|
Layout.maximumWidth: units.iconSizes.small
|
|
|
|
Layout.maximumHeight: units.iconSizes.small
|
2019-07-21 22:33:52 +02:00
|
|
|
opacity: 0.7
|
2020-01-29 18:52:25 +01:00
|
|
|
Rectangle {
|
|
|
|
color: "red"
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
width: parent.paintedWidth
|
|
|
|
height: parent.paintedHeight
|
|
|
|
}
|
2019-07-21 22:33:52 +02:00
|
|
|
}
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
id: label
|
2020-01-29 18:52:25 +01:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
|
|
|
verticalAlignment: Qt.AlignVCenter
|
2019-07-21 22:33:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ToolTipTrigger {
|
|
|
|
id: tooltipTrigger
|
|
|
|
anchors.fill: layout
|
|
|
|
}
|
|
|
|
}
|