forked from qt-creator/qt-creator
QmlDesigner: Fix ProjectsGrid delegate MouseArea
Task-number: QDS-4193 Change-Id: I68897288a75f864f5d361c41b52cf6e888f91bce Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
1f2b0cbf39
commit
e6c28a7844
@@ -29,6 +29,7 @@ import welcome 1.0
|
|||||||
import StudioFonts 1.0
|
import StudioFonts 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: root
|
||||||
visible: true
|
visible: true
|
||||||
width: 270
|
width: 270
|
||||||
height: 175
|
height: 175
|
||||||
@@ -37,6 +38,8 @@ Item {
|
|||||||
|
|
||||||
property alias downloadIcon: downloadCloud.visible
|
property alias downloadIcon: downloadCloud.visible
|
||||||
|
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
animateOpacity.start()
|
animateOpacity.start()
|
||||||
animateScale.start()
|
animateScale.start()
|
||||||
@@ -92,6 +95,8 @@ Item {
|
|||||||
label.color = "#686868"
|
label.color = "#686868"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClicked: root.clicked()
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: downloadCloud
|
id: downloadCloud
|
||||||
x: 210
|
x: 210
|
||||||
|
@@ -40,6 +40,7 @@ GridView {
|
|||||||
imageSource: typeof(thumbnail) === "undefined" ? "images/thumbnail_test.png" : thumbnail;
|
imageSource: typeof(thumbnail) === "undefined" ? "images/thumbnail_test.png" : thumbnail;
|
||||||
labelText: displayName
|
labelText: displayName
|
||||||
downloadIcon: typeof(showDownload) === "undefined" ? false : showDownload;
|
downloadIcon: typeof(showDownload) === "undefined" ? false : showDownload;
|
||||||
|
onClicked: root.itemSelected(index, root.model.get(index))
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: animation
|
id: animation
|
||||||
@@ -62,10 +63,5 @@ GridView {
|
|||||||
easing.type: Easing.InOutExpo
|
easing.type: Easing.InOutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: root.itemSelected(index, root.model.get(index))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user