Add tooltips for intent profiles to the Recommended Quality panel.

The description is optional.
Tooltip will not show if no description is set

CURA-6853
This commit is contained in:
Nino van Hooff 2019-10-17 15:54:03 +02:00
parent ad2077b76b
commit 3709cfa4ed
3 changed files with 51 additions and 12 deletions

View file

@ -163,6 +163,25 @@ Item
isCheckedFunction: checkedFunction
}
MouseArea // tooltip hover area
{
anchors.fill: parent
hoverEnabled: true
enabled: model.description !== undefined
acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks
onEntered:
{
print(model.description)
base.showTooltip(
intentCategoryLabel,
Qt.point(-(intentCategoryLabel.x - qualityRow.x) - UM.Theme.getSize("thick_margin").width, 0),
model.description
)
}
onExited: base.hideTooltip()
}
}
}