Make entire tooltip area clickable

Also saves on another component. And it's more logical, easier to use and fault-tolerant.

Contributes to issue CURA-7071.
This commit is contained in:
Ghostkeeper 2020-01-28 11:33:25 +01:00
parent 1d110c2c33
commit e6856b02a4
No known key found for this signature in database
GPG key ID: 37E2020986774393

View file

@ -80,7 +80,7 @@ Item
UM.TooltipArea UM.TooltipArea
{ {
width: childrenRect.width; width: childrenRect.width
height: parent.height height: parent.height
text: catalog.i18nc("@info:tooltip", "Go to Web Marketplace") text: catalog.i18nc("@info:tooltip", "Go to Web Marketplace")
anchors anchors
@ -89,6 +89,7 @@ Item
rightMargin: UM.Theme.getSize("default_margin").width rightMargin: UM.Theme.getSize("default_margin").width
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
onClicked: Qt.openUrlExternally(toolbox.getWebMarketplaceUrl)
Image Image
{ {
id: cloudMarketplaceButton id: cloudMarketplaceButton
@ -99,11 +100,6 @@ Item
sourceSize.width: width sourceSize.width: width
sourceSize.height: height sourceSize.height: height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
MouseArea
{
anchors.fill: parent
onClicked: Qt.openUrlExternally(toolbox.getWebMarketplaceUrl)
}
} }
} }