From 9772d4f99d9f4b0bdde7f9b2c832a765f86117b1 Mon Sep 17 00:00:00 2001 From: wjyrich Date: Wed, 4 Feb 2026 17:10:44 +0800 Subject: [PATCH] fix: disable tray items during collapse animation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Added `enabled: !DDT.TraySortOrderModel.isCollapsing` to ActionLegacyTrayPluginDelegate to disable tray items during collapse animation 2. Updated condition in TrayItemDelegateChooser to use `DDT.TraySortOrderModel.isCollapsing` instead of `DDT.TraySortOrderModel.collapsed` for input events 3. This prevents user interaction with tray items while the collapse animation is in progress 4. Fixes potential issues where users could click on items that are being animated or in transition state Log: Fixed tray items remaining interactive during collapse animation Influence: 1. Test tray collapse/expand animation to ensure items are disabled during transition 2. Verify that tray items become interactive again after animation completes 3. Check that input events are properly blocked during collapse animation 4. Test with different tray item types (legacy, modern, fixed, collapsable) 5. Verify that drag operations are not affected by this change fix: 修复托盘项在折叠动画期间保持交互的问题 1. 在 ActionLegacyTrayPluginDelegate 中添加 `enabled: ! DDT.TraySortOrderModel.isCollapsing`,在折叠动画期间禁用托盘项 2. 更新 TrayItemDelegateChooser 中的条件,使 用 `DDT.TraySortOrderModel.isCollapsing` 替代 `DDT.TraySortOrderModel.collapsed` 来控制输入事件 3. 防止用户在折叠动画进行期间与托盘项交互 4. 修复了用户可能点击正在动画或过渡状态中的托盘项的问题 Log: 修复了托盘项在折叠动画期间保持交互的问题 Influence: 1. 测试托盘折叠/展开动画,确保托盘项在过渡期间被禁用 2. 验证托盘项在动画完成后重新变为可交互状态 3. 检查折叠动画期间输入事件是否被正确阻止 4. 测试不同类型的托盘项(传统、现代、固定、可折叠) 5. 验证拖拽操作不受此更改影响 PMS: BUG-342345 --- panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml | 1 + panels/dock/tray/package/TrayItemDelegateChooser.qml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml b/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml index 33562d855..ddb79877e 100644 --- a/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml +++ b/panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml @@ -31,6 +31,7 @@ AppletItemButton { visible: !Drag.active && itemVisible hoverEnabled: inputEventsEnabled + enabled: !DDT.TraySortOrderModel.isCollapsing function updatePluginMargins() { diff --git a/panels/dock/tray/package/TrayItemDelegateChooser.qml b/panels/dock/tray/package/TrayItemDelegateChooser.qml index f02549115..ce0212295 100644 --- a/panels/dock/tray/package/TrayItemDelegateChooser.qml +++ b/panels/dock/tray/package/TrayItemDelegateChooser.qml @@ -36,7 +36,7 @@ LQM.DelegateChooser { contentItem: ActionLegacyTrayPluginDelegate { id: traySurfaceDelegate objectName: "tray" - inputEventsEnabled: !disableInputEvents && (model.sectionType !== "collapsable" || !DDT.TraySortOrderModel.collapsed) + inputEventsEnabled: !disableInputEvents && (model.sectionType !== "collapsable" || !DDT.TraySortOrderModel.isCollapsing) itemVisible: traySurfacePositioner.itemVisible dragable: model.sectionType !== "fixed" isActive: surfacePopup.isOpened