Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 426 Lines • ▼ Show 20 Line(s) | 169 | MouseEventListener { | |||
---|---|---|---|---|---|
427 | Timer { | 427 | Timer { | ||
428 | id: doubleClickTimer | 428 | id: doubleClickTimer | ||
429 | 429 | | |||
430 | onTriggered: { | 430 | onTriggered: { | ||
431 | listener.doubleClickInProgress = false; | 431 | listener.doubleClickInProgress = false; | ||
432 | } | 432 | } | ||
433 | } | 433 | } | ||
434 | 434 | | |||
435 | Timer { | ||||
436 | id: hoverActivateTimer | ||||
437 | | ||||
438 | interval: root.hoverActivateDelay | ||||
439 | | ||||
440 | onTriggered: { | ||||
441 | if (!hoveredItem) { | ||||
442 | return; | ||||
443 | } | ||||
444 | | ||||
445 | if (root.useListViewMode) { | ||||
446 | doCd(index); | ||||
447 | } else { | ||||
448 | hoveredItem.openPopup(); | ||||
449 | } | ||||
450 | } | ||||
451 | } | ||||
452 | | ||||
435 | PlasmaExtras.ScrollArea { | 453 | PlasmaExtras.ScrollArea { | ||
436 | id: scrollArea | 454 | id: scrollArea | ||
437 | 455 | | |||
438 | anchors.fill: parent | 456 | anchors.fill: parent | ||
439 | 457 | | |||
440 | focus: true | 458 | focus: true | ||
441 | 459 | | |||
442 | GridView { | 460 | GridView { | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
488 | model: positioner | 506 | model: positioner | ||
489 | 507 | | |||
490 | delegate: FolderItemDelegate { | 508 | delegate: FolderItemDelegate { | ||
491 | width: gridView.cellWidth | 509 | width: gridView.cellWidth | ||
492 | height: gridView.cellHeight | 510 | height: gridView.cellHeight | ||
493 | } | 511 | } | ||
494 | 512 | | |||
495 | onContentXChanged: { | 513 | onContentXChanged: { | ||
514 | if (hoveredItem) { | ||||
515 | hoverActivateTimer.stop(); | ||||
516 | } | ||||
517 | | ||||
496 | dir.setDragHotSpotScrollOffset(contentX, contentY); | 518 | dir.setDragHotSpotScrollOffset(contentX, contentY); | ||
497 | 519 | | |||
498 | if (contentX == 0) { | 520 | if (contentX == 0) { | ||
499 | scrollLeft = false; | 521 | scrollLeft = false; | ||
500 | } | 522 | } | ||
501 | 523 | | |||
502 | if (contentX == contentItem.width - width) { | 524 | if (contentX == contentItem.width - width) { | ||
503 | scrollRight = false; | 525 | scrollRight = false; | ||
Show All 13 Lines | 537 | if (scrollRight) { | |||
517 | rB.width = lastCol - rB.x; | 539 | rB.width = lastCol - rB.x; | ||
518 | } | 540 | } | ||
519 | 541 | | |||
520 | gridView.rectangleSelect(rB.x, rB.y, rB.width, rB.height); | 542 | gridView.rectangleSelect(rB.x, rB.y, rB.width, rB.height); | ||
521 | } | 543 | } | ||
522 | } | 544 | } | ||
523 | 545 | | |||
524 | onContentYChanged: { | 546 | onContentYChanged: { | ||
547 | if (hoveredItem) { | ||||
548 | hoverActivateTimer.stop(); | ||||
549 | } | ||||
550 | | ||||
525 | dir.setDragHotSpotScrollOffset(contentX, contentY); | 551 | dir.setDragHotSpotScrollOffset(contentX, contentY); | ||
526 | 552 | | |||
527 | if (contentY == 0) { | 553 | if (contentY == 0) { | ||
528 | scrollUp = false; | 554 | scrollUp = false; | ||
529 | } | 555 | } | ||
530 | 556 | | |||
531 | if (contentY == contentItem.height - height) { | 557 | if (contentY == contentItem.height - height) { | ||
532 | scrollDown = false; | 558 | scrollDown = false; | ||
▲ Show 20 Lines • Show All 632 Lines • Show Last 20 Lines |