Add a Cura Tooltip to show in some buttons

Contributes to CURA-6004.
This commit is contained in:
Diego Prado Gesto 2018-12-10 09:09:58 +01:00
parent 15f81da95b
commit 2bf641efcf
8 changed files with 59 additions and 11 deletions

View file

@ -16,7 +16,7 @@ Button
property alias iconSource: buttonIconLeft.source
property alias textFont: buttonText.font
property alias cornerRadius: backgroundRect.radius
property alias tooltip: tooltip.text
property alias tooltip: tooltip.tooltipText
property alias cornerSide: backgroundRect.cornerSide
property color color: UM.Theme.getColor("primary")
@ -109,11 +109,9 @@ Button
z: backgroundRect.z - 1
}
ToolTip
Cura.ToolTip
{
id: tooltip
text: ""
delay: 500
visible: text != "" && button.hovered
show: button.hovered
}
}