Browse Source

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
Konstantinos Karmas 3 years ago
parent
commit
06b0d12844
1 changed files with 1 additions and 0 deletions
  1. 1 0
      resources/qml/ToolTip.qml

+ 1 - 0
resources/qml/ToolTip.qml

@@ -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