Commit a4d25d7
committed
fix: improve folder grid view navigation and focus handling
1. Changed from onCurrentIndexChanged to onCurrentItemChanged for focus
reset to ensure target page is loaded before setting focus
2. Added pendingFocusIndex property to track desired focus position when
switching pages
3. Enhanced resetGridFocus function to handle focus index calculation
and delayed execution via Qt.callLater
4. Added left/right key navigation for both grid view modes (icon and
list) to enable cross-page navigation
5. Implemented circular navigation within pages and between pages
6. Improved model count detection to handle different model types (count
property vs rowCount method)
Log: Improved folder navigation with keyboard arrow keys and fixed focus
issues when switching pages
Influence:
1. Test left/right arrow key navigation within a folder page
2. Verify focus correctly transfers when navigating between pages using
arrow keys
3. Test circular navigation when reaching page boundaries
4. Verify focus position is maintained when switching pages
5. Test with empty folders and single-page folders
6. Verify both icon view and list view modes work correctly
7. Test focus behavior when quickly switching between pages
fix: 改进文件夹网格视图导航和焦点处理
1. 将焦点重置从 onCurrentIndexChanged 改为 onCurrentItemChanged,确保目
标页面加载完成后再设置焦点
2. 添加 pendingFocusIndex 属性来跟踪切换页面时所需的焦点位置
3. 增强 resetGridFocus 函数,通过 Qt.callLater 处理焦点索引计算和延迟
执行
4. 为两种网格视图模式(图标和列表)添加左右键导航功能,支持跨页面导航
5. 实现页面内和页面间的循环导航
6. 改进模型数量检测,处理不同类型的模型(count 属性 vs rowCount 方法)
Log: 改进文件夹导航,支持键盘方向键导航,修复切换页面时的焦点问题
Influence:
1. 测试文件夹页面内的左右方向键导航
2. 验证使用方向键在页面间导航时焦点是否正确转移
3. 测试到达页面边界时的循环导航
4. 验证切换页面时焦点位置是否正确保持
5. 测试空文件夹和单页文件夹的情况
6. 验证图标视图和列表视图模式都能正常工作
7. 测试快速切换页面时的焦点行为
PMS: BUG-333261 BUG-3332551 parent 44f422c commit a4d25d7
1 file changed
Lines changed: 140 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
284 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
285 | 287 | | |
286 | | - | |
| 288 | + | |
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
| |||
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
306 | | - | |
| 308 | + | |
307 | 309 | | |
308 | | - | |
| 310 | + | |
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
315 | | - | |
| 317 | + | |
316 | 318 | | |
317 | | - | |
318 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
319 | 343 | | |
320 | 344 | | |
321 | 345 | | |
| |||
372 | 396 | | |
373 | 397 | | |
374 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
375 | 453 | | |
376 | 454 | | |
377 | 455 | | |
| |||
401 | 479 | | |
402 | 480 | | |
403 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
404 | 536 | | |
405 | 537 | | |
406 | 538 | | |
| |||
0 commit comments