mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Add tooltips for elements of extruder box
All things that need a tooltip now have their tooltip. The tooltips don't seem to align well though. Contributes to issue CURA-3161.
This commit is contained in:
parent
3d8afa9deb
commit
67b72ee6df
1 changed files with 90 additions and 0 deletions
|
@ -96,12 +96,35 @@ Column
|
||||||
}
|
}
|
||||||
Label //Temperature indication.
|
Label //Temperature indication.
|
||||||
{
|
{
|
||||||
|
id: extruderTemperature
|
||||||
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
MouseArea //For tooltip.
|
||||||
|
{
|
||||||
|
id: extruderTemperatureTooltipArea
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
if (containsMouse)
|
||||||
|
{
|
||||||
|
base.showTooltip(
|
||||||
|
base,
|
||||||
|
{x: 0, y: parent.mapToItem(base, 0, 0).y},
|
||||||
|
catalog.i18nc("@tooltip", "The current temperature of this extruder.")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle //Material colour indication.
|
Rectangle //Material colour indication.
|
||||||
{
|
{
|
||||||
|
@ -115,6 +138,28 @@ Column
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: materialName.verticalCenter
|
anchors.verticalCenter: materialName.verticalCenter
|
||||||
|
|
||||||
|
MouseArea //For tooltip.
|
||||||
|
{
|
||||||
|
id: materialColorTooltipArea
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
if (containsMouse)
|
||||||
|
{
|
||||||
|
base.showTooltip(
|
||||||
|
base,
|
||||||
|
{x: 0, y: parent.mapToItem(base, 0, 0).y},
|
||||||
|
catalog.i18nc("@tooltip", "The colour of the material in this extruder.")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Label //Material name.
|
Label //Material name.
|
||||||
{
|
{
|
||||||
|
@ -125,15 +170,60 @@ Column
|
||||||
anchors.left: materialColor.right
|
anchors.left: materialColor.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
MouseArea //For tooltip.
|
||||||
|
{
|
||||||
|
id: materialNameTooltipArea
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
if (containsMouse)
|
||||||
|
{
|
||||||
|
base.showTooltip(
|
||||||
|
base,
|
||||||
|
{x: 0, y: parent.mapToItem(base, 0, 0).y},
|
||||||
|
catalog.i18nc("@tooltip", "The material in this extruder.")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Label //Variant name.
|
Label //Variant name.
|
||||||
{
|
{
|
||||||
|
id: variantName
|
||||||
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null) ? connectedPrinter.hotendIds[index] : ""
|
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null) ? connectedPrinter.hotendIds[index] : ""
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
MouseArea //For tooltip.
|
||||||
|
{
|
||||||
|
id: variantNameTooltipArea
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
if (containsMouse)
|
||||||
|
{
|
||||||
|
base.showTooltip(
|
||||||
|
base,
|
||||||
|
{x: 0, y: parent.mapToItem(base, 0, 0).y},
|
||||||
|
catalog.i18nc("@tooltip", "The nozzle inserted in this extruder.")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue