mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-29 05:41:05 -07:00
Add tooltip to IconWithText.qml,
Use this to display tooltips for Infill, Support and Adhesion in recommended settings. CURA-8849
This commit is contained in:
parent
f650579799
commit
c6bc3a5cd7
4 changed files with 14 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ Item
|
|||
property alias wrapMode: label.wrapMode
|
||||
property real spacing: UM.Theme.getSize("narrow_margin").width
|
||||
|
||||
property string tooltipText
|
||||
|
||||
// These properties can be used in combination with layouts.
|
||||
readonly property real contentWidth: icon.width + margin + label.contentWidth
|
||||
readonly property real minContentWidth: Math.round(icon.width + margin + 0.5 * label.contentWidth)
|
||||
|
|
@ -66,4 +68,13 @@ Item
|
|||
margins: margin
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea
|
||||
{
|
||||
enabled: tooltipText != null
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: base.showTooltip(parent, Qt.point(-UM.Theme.getSize("thick_margin").width, 0), tooltipText)
|
||||
onExited: base.hideTooltip()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue