Commit 613514a
committed
fix: allow right-click long press to trigger context menu on touchscreen
1. Previously, onPressAndHold handlers only triggered when mouse.button
was Qt.NoButton
2. Added Qt.RightButton as an additional trigger condition for long
press
3. This allows right-click long press to also trigger context menus
4. Applied consistently across all relevant QML files: IconItemDelegate,
AppListView, FreeSortListView, and windowed IconItemDelegate
Log: Fixed context menu not opening on right-click long press
Influence:
1. Test right-click long press on icons to verify context menu appears
2. Test regular long press (no button) still works as before
3. Verify no regression for touchscreen long press behavior
4. Test in both normal and windowed mode
fix: 允许右键长按触发上下文菜单
1. 之前 onPressAndHold 处理器仅在 mouse.button 为 Qt.NoButton 时触发
2. 增加了 Qt.RightButton 作为长按的额外触发条件
3. 使右键长按也能触发上下文菜单
4. 在所有相关的 QML 文件中统一应用此修改:IconItemDelegate、
AppListView、FreeSortListView 和窗口模式下的 IconItemDelegate
Log: 修复右键长按时上下文菜单无法打开的问题
Influence:
1. 在图标上测试右键长按,验证上下文菜单是否弹出
2. 测试常规长按(无按钮)是否仍正常工作
3. 验证触控屏长按行为没有回归问题
4. 在普通模式和窗口模式下分别测试
PMS: BUG-3588271 parent ca88a70 commit 613514a
4 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments