Commit 97bea48
committed
fix: add touchscreen long press support for app launcher
Added touchscreen long press event handling to three QML components to
enable context menu activation on touch devices. Previously, only mouse
right-click triggered context menus, leaving touchscreen users unable to
access these features.
1. Modified AppListView.qml to add onPressAndHold handler for
touchscreen long press
2. Modified FreeSortListView.qml to add onPressAndHold handler with
additional logic for hiding "Move to Top" menu on first item
3. Modified IconItemDelegate.qml to add onPressAndHold handler that
triggers menu functionality
4. All handlers check for Qt.NoButton to distinguish touch events from
mouse events
Log: Touchscreen users can now long press on app icons to open context
menus
Influence:
1. Test long press on app icons in both AppListView and FreeSortListView
modes
2. Verify context menu appears correctly on touchscreen devices
3. Test that mouse right-click functionality remains unchanged
4. Verify "Move to Top" menu item is hidden when long pressing first
item in FreeSortListView
5. Test that regular tap/click behavior remains unaffected
6. Verify context menu options work correctly after touch activation
fix: 为应用启动器添加触摸屏长按支持
为三个QML组件添加了触摸屏长按事件处理,使触摸设备用户能够激活上下文菜
单。之前只有鼠标右键点击能触发上下文菜单,触摸屏用户无法使用这些功能。
1. 修改AppListView.qml,为触摸屏长按添加onPressAndHold处理器
2. 修改FreeSortListView.qml,添加onPressAndHold处理器,包含隐藏首项"移至
顶部"菜单的额外逻辑
3. 修改IconItemDelegate.qml,添加触发菜单功能的onPressAndHold处理器
4. 所有处理器都检查Qt.NoButton以区分触摸事件和鼠标事件
Log: 触摸屏用户现在可以通过长按应用图标打开上下文菜单
Influence:
1. 在AppListView和FreeSortListView模式下测试应用图标长按
2. 验证在触摸屏设备上上下文菜单正确显示
3. 测试鼠标右键点击功能保持不变
4. 验证在FreeSortListView中长按第一项时"移至顶部"菜单项被隐藏
5. 测试常规点击行为不受影响
6. 验证通过触摸激活后上下文菜单选项正常工作
PMS: BUG-3529891 parent 8e2a211 commit 97bea48
3 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
353 | 363 | | |
354 | 364 | | |
355 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
0 commit comments