shift-shell/shell/contents/components/HomeLauncherSvg.qml
2015-02-24 16:26:17 +01:00

33 lines
707 B
QML

import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
id: root
width: parent.width / parent.columns
height: parent.buttonHeight
property var callback
property string text
property string sub
property alias svg: icon.svg
property alias elementId: icon.elementId
PlasmaCore.SvgItem{
id: icon
width: units.iconSizes.medium
height: width
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
propagateComposedEvents: true
onClicked: {
if (callback) {
callback();
} else {
addNumber(parent.text);
}
}
}
}