Martchus
912dca1564
* Split QML part into distinct versions for Plasma 5 and 6 as there are too many differences and `#ifdef` is not possible * Change API usage according to https://develop.kde.org/docs/plasma/widget/porting_kf6 * Port "contextualActions" to API documented on https://invent.kde.org/frameworks/plasma-framework/-/blob/master/src/plasma/applet.h * Document testing * Add FIXMEs/notes for remaining problems; there are likely many more, though
36 lines
840 B
QML
36 lines
840 B
QML
import QtQuick 2.0
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents3
|
|
|
|
Item {
|
|
property alias iconSource: iconItem.source
|
|
property alias iconOpacity: iconItem.opacity
|
|
property alias text: label.text
|
|
property alias tooltip: tooltipTrigger.tooltip
|
|
|
|
implicitWidth: layout.implicitWidth
|
|
implicitHeight: layout.implicitHeight
|
|
|
|
RowLayout {
|
|
id: layout
|
|
|
|
Image {
|
|
id: iconItem
|
|
Layout.preferredWidth: 16
|
|
Layout.preferredHeight: 16
|
|
height: 16
|
|
cache: false
|
|
fillMode: Image.PreserveAspectFit
|
|
}
|
|
PlasmaComponents3.Label {
|
|
id: label
|
|
}
|
|
}
|
|
ToolTipTrigger {
|
|
id: tooltipTrigger
|
|
anchors.fill: layout
|
|
}
|
|
}
|