Now displaying a help icon and value units

CURA-11561
This commit is contained in:
Erwan MATHIEU 2024-02-01 10:34:19 +01:00
parent fcf1e63160
commit 38b67f8015
4 changed files with 29 additions and 31 deletions

View file

@ -5,7 +5,7 @@ import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.5 as UM
import UM 1.8 as UM
Item
@ -80,34 +80,13 @@ Item
sourceComponent: combobox
}
MouseArea
UM.HelpIcon
{
id: helpIconMouseArea
anchors.right: parent.right
anchors.verticalCenter: comboboxLabel.verticalCenter
width: childrenRect.width
height: childrenRect.height
hoverEnabled: true
UM.ColorImage
{
width: UM.Theme.getSize("section_icon").width
height: width
visible: comboboxTooltipText != ""
source: UM.Theme.getIcon("Help")
color: UM.Theme.getColor("text")
UM.ToolTip
{
text: comboboxTooltipText
visible: helpIconMouseArea.containsMouse
targetPoint: Qt.point(parent.x + Math.round(parent.width / 2), parent.y)
x: 0
y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
width: UM.Theme.getSize("tooltip").width
}
}
text: comboboxTooltipText
visible: comboboxTooltipText != ""
}
}