Skip to content

Commit 48d909d

Browse files
robertkilldeepin-bot[bot]
authored andcommitted
fix: show tray action icons during drag operations
Added logic to make tray action icons (collapse/show stash) visible during drag operations over the tray area. When a drag event enters the tray container, the action icons become visible to provide better visual feedback. When the drag leaves without dropping, the action icons are hidden again to maintain normal UI state. Log: Tray action icons now appear during drag operations over the tray Influence: 1. Test dragging items over the system tray area 2. Verify action icons become visible when dragging over tray 3. Confirm action icons hide when drag leaves without dropping 4. Check that normal tray functionality remains unchanged 5. Test with various drag sources and file types feat: 在拖拽操作期间显示托盘操作图标 添加了在拖拽操作期间使托盘操作图标(收起/显示隐藏)可见的逻辑。当拖拽事 件进入托盘容器时,操作图标变为可见以提供更好的视觉反馈。当拖拽离开而没有 放置时,操作图标再次隐藏以保持正常的UI状态。 Log: 托盘操作图标现在在拖拽操作期间出现在托盘上方 Influence: 1. 测试在系统托盘区域上方拖拽项目 2. 验证拖拽到托盘上方时操作图标是否可见 3. 确认拖拽离开而没有放置时操作图标是否隐藏 4. 检查正常托盘功能是否保持不变 5. 使用各种拖拽源和文件类型进行测试 PMS: BUG-336195
1 parent 2a6eecf commit 48d909d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

panels/dock/tray/package/TrayContainer.qml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Item {
152152
surfaceId = dragEvent.getDataAsString("text/x-dde-shell-tray-dnd-surfaceId")
153153
source = dragEvent.getDataAsString("text/x-dde-shell-tray-dnd-source")
154154
console.log(surfaceId, source)
155+
// Make action icons (collapse/show stash) visible while dragging over tray
156+
DDT.TraySortOrderModel.actionsAlwaysVisible = true
155157
if (source !== "" && DDT.TraySortOrderModel.isDisplayedSurface(surfaceId)) {
156158
dragEvent.accepted = false
157159
} else {
@@ -220,6 +222,10 @@ Item {
220222
dropTrayTimer.stop()
221223
DDT.TraySortOrderModel.setSurfaceVisible(surfaceId, false)
222224
}
225+
// Hide action icons when drag leaves tray without dropping
226+
if (!isDropped) {
227+
DDT.TraySortOrderModel.actionsAlwaysVisible = false
228+
}
223229
}
224230

225231
Timer {

0 commit comments

Comments
 (0)