Skip to content

Commit 178fd7f

Browse files
committed
fix: tooltip not centered when first hover
首次计算位置时先计算的bounding后设置的文字,所以首次计算结果肯定不正确. PMS: BUG-340869 Log:
1 parent f601a66 commit 178fd7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

panels/dock/taskmanager/package/AppItem.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ Item {
391391
interval: 50
392392
onTriggered: {
393393
var point = root.mapToItem(null, root.width / 2, root.height / 2)
394-
toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height)
395394
toolTip.text = root.itemId === "dde-trash" ? root.name + "-" + taskmanager.Applet.getTrashTipText() : root.name
395+
toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height)
396396
toolTip.open()
397397
}
398398
}

0 commit comments

Comments
 (0)