mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06: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()
|
||||
}
|
||||
}
|
|
@ -28,6 +28,7 @@ Item
|
|||
font: UM.Theme.getFont("medium")
|
||||
width: labelColumnWidth
|
||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
||||
tooltipText: catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.")
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
|
@ -65,6 +65,7 @@ Item
|
|||
font: UM.Theme.getFont("medium")
|
||||
width: labelColumnWidth
|
||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
||||
tooltipText: catalog.i18nc("@label", "Gradual infill will gradually increase the amount of infill towards the top.")
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
|
@ -29,6 +29,7 @@ Item
|
|||
font: UM.Theme.getFont("medium")
|
||||
width: labelColumnWidth
|
||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
||||
tooltipText: catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue