- MouseArea {
- id: loc
- anchors.fill: parent
- property string currentId: ''
- property int newIndex: -1
- property int index: grid.indexAt(loc.mouseX, loc.mouseY)
- x: 62
- y: 264
- onPressAndHold: currentId = applicationModel.id(newIndex = index)
- onReleased: {
- if (currentId === '') {
- pid = launcher.launch(applicationModel.id(loc.index))
- if (1 < pid) {
+ Text {
+ color: "white"
+ anchors.top: myIcon.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: 20
+ font.pixelSize: 25
+ font.letterSpacing: 5
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr(model.name.toUpperCase())
+ }
+
+ Image {
+ id: myIcon
+ anchors.top: parent.top
+ anchors.topMargin: 20
+ anchors.horizontalCenter: parent.horizontalCenter
+ // make the image/icons smaller than the grid cell size as
+ // the text below/above current cell not be on top of the
+ // current icon
+ width: 220
+ height: 220
+ source: model.icon
+ antialiasing: true
+ property string initial: model.name.substring(0,1).toUpperCase()
+
+ Item {
+ id: title
+ width: 125
+ height: 125
+ anchors.centerIn: parent
+ Label {
+ style: Text.Outline
+ styleColor: '#00ADDC'
+ color: 'transparent'
+ font.pixelSize: 125
+ anchors.centerIn: parent
+ anchors.horizontalCenterOffset: model.index / 3 - 1
+ anchors.verticalCenterOffset: model.index % 3 - 1
+ text: model.icon === 'blank' ? myIcon.initial : ''
+ }
+
+ layer.enabled: true
+ layer.effect: LinearGradient {
+ gradient: Gradient {
+ GradientStop { position: -0.5; color: "#6BFBFF" }
+ GradientStop { position: +1.5; color: "#00ADDC" }
+ }
+ }