shift-shell/containments/homescreen/contents/ui/HomeLauncher.qml

51 lines
1.5 KiB
QML
Raw Normal View History

import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kio 1.0 as Kio
import org.kde.plasma.components 2.0 as PlasmaComponents
2015-03-05 14:32:44 +00:00
Item {
2015-03-05 13:02:32 +00:00
id: delegateRoot
width: applicationsView.cellWidth
height: width
2015-03-05 14:32:44 +00:00
property var modelData: model
2015-04-11 10:40:54 +00:00
property bool isDropTarget: delegateRoot != dragDelegate && root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole == modelData.ApplicationStorageIdRole
2015-04-11 10:40:54 +00:00
opacity: isDropTarget ? 0.3 : 1
PlasmaCore.IconItem {
id: icon
anchors.centerIn: parent
width: parent.height / 2
height: width
source: modelData.ApplicationIconRole
2015-04-11 09:36:17 +00:00
scale: root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole != modelData.ApplicationStorageIdRole ? 0.6 : 1
Behavior on scale {
NumberAnimation {
duration: units.longDuration
easing.type: Easing.InOutQuad
}
2015-03-13 12:50:13 +00:00
}
}
PlasmaComponents.Label {
id: label
visible: text.length > 0
anchors {
top: icon.bottom
left: icon.left
right: icon.right
2015-03-05 14:32:44 +00:00
}
wrapMode: Text.WordWrap
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
maximumLineCount: 2
text: modelData.ApplicationNameRole
font.pixelSize: theme.smallestFont.pixelSize
color: PlasmaCore.ColorScope.textColor
}
}