mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 03:05:57 +08:00
Add tooltip for pre-heat input field
Just to clarify what you need to put there. Contributes to issue CURA-3161.
This commit is contained in:
parent
c7793238f7
commit
e142f51e12
@ -204,7 +204,7 @@ Column
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : mouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : preheatTemperatureMouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||||
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.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
@ -230,10 +230,26 @@ Column
|
|||||||
}
|
}
|
||||||
MouseArea //Change cursor on hovering.
|
MouseArea //Change cursor on hovering.
|
||||||
{
|
{
|
||||||
id: mouseArea
|
id: preheatTemperatureInputMouseArea
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.IBeamCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
|
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
if (containsMouse)
|
||||||
|
{
|
||||||
|
base.showTooltip(
|
||||||
|
base,
|
||||||
|
{x: 0, y: preheatTemperatureInputMouseArea.mapToItem(base, 0, 0).y},
|
||||||
|
catalog.i18nc("@tooltip of temperature input", "The temperature to pre-heat the bed to.")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
TextInput
|
TextInput
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user