mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 18:29:04 +08: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
@ -24,6 +24,8 @@ Item
|
|||||||
property alias wrapMode: label.wrapMode
|
property alias wrapMode: label.wrapMode
|
||||||
property real spacing: UM.Theme.getSize("narrow_margin").width
|
property real spacing: UM.Theme.getSize("narrow_margin").width
|
||||||
|
|
||||||
|
property string tooltipText
|
||||||
|
|
||||||
// These properties can be used in combination with layouts.
|
// These properties can be used in combination with layouts.
|
||||||
readonly property real contentWidth: icon.width + margin + label.contentWidth
|
readonly property real contentWidth: icon.width + margin + label.contentWidth
|
||||||
readonly property real minContentWidth: Math.round(icon.width + margin + 0.5 * label.contentWidth)
|
readonly property real minContentWidth: Math.round(icon.width + margin + 0.5 * label.contentWidth)
|
||||||
@ -66,4 +68,13 @@ Item
|
|||||||
margins: margin
|
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")
|
font: UM.Theme.getFont("medium")
|
||||||
width: labelColumnWidth
|
width: labelColumnWidth
|
||||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
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
|
Item
|
||||||
|
@ -65,6 +65,7 @@ Item
|
|||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
width: labelColumnWidth
|
width: labelColumnWidth
|
||||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
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
|
Item
|
||||||
|
@ -29,6 +29,7 @@ Item
|
|||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
width: labelColumnWidth
|
width: labelColumnWidth
|
||||||
iconSize: UM.Theme.getSize("medium_button_icon").width
|
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
|
Item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user