Add indicator arrow to slider

CURA-9793
This commit is contained in:
c.lamboo 2022-11-29 14:37:45 +01:00
parent f4e7829e0b
commit a470a6c333

View file

@ -80,6 +80,26 @@ RowLayout
border.width: UM.Theme.getSize("wide_lining").height
}
UM.PointingRectangle
{
arrowSize: UM.Theme.getSize("button_tooltip_arrow").width
width: childrenRect.width
height: childrenRect.height
target: Qt.point(handleButton.x + handleButton.width / 2, handleButton.y + handleButton.height / 2)
x: handleButton.x - width / 2 + handleButton.width / 2
y: handleButton.y - height - UM.Theme.getSize("button_tooltip_arrow").height - UM.Theme.getSize("narrow_margin").height
color: UM.Theme.getColor("tooltip");
UM.Label
{
text: `${infillSlider.value}%`
horizontalAlignment: TextInput.AlignHCenter
leftPadding: UM.Theme.getSize("narrow_margin").width
rightPadding: UM.Theme.getSize("narrow_margin").width
color: UM.Theme.getColor("tooltip_text");
}
}
Connections
{
target: infillSlider