Don't draw tooltip background if height is 0

In some buttons (specifically, the "Manage printers" button), the tooltip arrow is being drawn even though the tooltip text is empty. This commit fixes that by making sure that the background rectangle (PointingRectangle) of the tooltip is not be visible if the height of the tooltip is 0.

CURA-8334
This commit is contained in:
Konstantinos Karmas 2021-06-21 13:24:22 +02:00
parent cfe395460f
commit 06b0d12844

View file

@ -59,6 +59,7 @@ ToolTip
color: UM.Theme.getColor("tooltip")
target: Qt.point(targetPoint.x - tooltip.x, targetPoint.y - tooltip.y)
arrowSize: UM.Theme.getSize("default_arrow").width
visible: tooltip.height != 0
}
contentItem: Label