shift-shell/shell/contents/components/HomeLauncher.qml

41 lines
1,019 B
QML
Raw Normal View History

2014-09-29 20:43:08 +00:00
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
2014-10-23 13:12:49 +00:00
import org.kde.kio 1.0 as Kio
2014-11-25 16:57:38 +00:00
import org.kde.plasma.components 2.0 as PlasmaComponents
2014-09-29 20:43:08 +00:00
MouseArea {
id: root
width: applications.cellWidth
height: width
onClicked: {
console.log("Clicked: " + model.ApplicationStorageIdRole)
appListModel.runApplication(model.ApplicationStorageIdRole)
2014-09-29 20:43:08 +00:00
}
PlasmaCore.IconItem {
id: icon
2014-10-23 13:06:35 +00:00
anchors.centerIn: parent
2014-09-29 20:43:08 +00:00
width: units.iconSizes.large
height: width
source: model.ApplicationIconRole
2014-09-29 20:43:08 +00:00
}
2014-11-25 16:57:38 +00:00
PlasmaComponents.Label {
2014-09-29 20:43:08 +00:00
visible: text.length > 0
anchors {
top: icon.bottom
2014-10-23 13:06:35 +00:00
left: icon.left
right: icon.right
2014-09-29 20:43:08 +00:00
}
2014-10-23 13:06:35 +00:00
wrapMode: Text.WordWrap
2014-09-29 20:43:08 +00:00
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
text: model.ApplicationNameRole
font.pixelSize: theme.smallestFont.pixelSize
2014-11-25 16:57:38 +00:00
color: PlasmaCore.ColorScope.textColor
2014-09-29 20:43:08 +00:00
}
}