Skip to content

Commit 0449eef

Browse files
committed
fix: move tooltip text assignment to show handler
1. Move tooltip text assignment from property initialization to onTriggered handler 2. This ensures the trash tip text is dynamically updated when tooltip is shown 3. Fixes potential stale trash status display in tooltips 4. Maintains same functionality but with proper timing fix: 将工具提示文本赋值移动到显示处理程序 1. 将工具提示文本赋值从属性初始化移动到 onTriggered 处理程序 2. 确保垃圾桶提示文本在工具提示显示时动态更新 3. 修复工具提示中可能显示过时垃圾桶状态的问题 4. 保持相同功能但具有正确的时机控制 PMS: BUG-336825
1 parent 4c11f38 commit 0449eef

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
@@ -369,7 +369,6 @@ Item {
369369

370370
PanelToolTip {
371371
id: toolTip
372-
text: root.itemId === "dde-trash" ? root.name + "-" + taskmanager.Applet.getTrashTipText() : root.name
373372
toolTipX: DockPanelPositioner.x
374373
toolTipY: DockPanelPositioner.y
375374
}
@@ -388,6 +387,7 @@ Item {
388387
onTriggered: {
389388
var point = root.mapToItem(null, root.width / 2, root.height / 2)
390389
toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height)
390+
toolTip.text = root.itemId === "dde-trash" ? root.name + "-" + taskmanager.Applet.getTrashTipText() : root.name
391391
toolTip.open()
392392
}
393393
}

0 commit comments

Comments
 (0)