Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 835 Lines • ▼ Show 20 Line(s) | 811 | if (main.rubberBand.intersects(Qt.rect(itemX + units.smallSpacing, itemY + units.smallSpacing, | |||
---|---|---|---|---|---|
836 | } | 836 | } | ||
837 | } | 837 | } | ||
838 | } | 838 | } | ||
839 | } | 839 | } | ||
840 | 840 | | |||
841 | gridView.cachedRectangleSelection = indices; | 841 | gridView.cachedRectangleSelection = indices; | ||
842 | } | 842 | } | ||
843 | 843 | | |||
844 | Behavior on contentX { id: smoothX; enabled: false; SmoothedAnimation { velocity: 700 } } | 844 | function runOrCdSelected() { | ||
845 | Behavior on contentY { id: smoothY; enabled: false; SmoothedAnimation { velocity: 700 } } | | |||
846 | | ||||
847 | Keys.onReturnPressed: { | | |||
848 | if (currentIndex != -1 && dir.hasSelection()) { | 845 | if (currentIndex != -1 && dir.hasSelection()) { | ||
849 | if (root.useListViewMode && currentItem.isDir) { | 846 | if (root.useListViewMode && currentItem.isDir) { | ||
850 | doCd(positioner.map(currentIndex)); | 847 | doCd(positioner.map(currentIndex)); | ||
851 | } else { | 848 | } else { | ||
852 | dir.runSelected(); | 849 | dir.runSelected(); | ||
853 | } | 850 | } | ||
854 | } | 851 | } | ||
855 | } | 852 | } | ||
856 | 853 | | |||
854 | Behavior on contentX { id: smoothX; enabled: false; SmoothedAnimation { velocity: 700 } } | ||||
855 | Behavior on contentY { id: smoothY; enabled: false; SmoothedAnimation { velocity: 700 } } | ||||
856 | | ||||
857 | Keys.onReturnPressed: runOrCdSelected() | ||||
858 | Keys.onEnterPressed: runOrCdSelected() | ||||
859 | | ||||
857 | Keys.onMenuPressed: { | 860 | Keys.onMenuPressed: { | ||
858 | if (currentIndex != -1 && dir.hasSelection() && currentItem) { | 861 | if (currentIndex != -1 && dir.hasSelection() && currentItem) { | ||
859 | dir.setSelected(positioner.map(currentIndex)); | 862 | dir.setSelected(positioner.map(currentIndex)); | ||
860 | dir.openContextMenu(currentItem.frame); | 863 | dir.openContextMenu(currentItem.frame); | ||
861 | } else { | 864 | } else { | ||
862 | // Otherwise let the containment handle it. | 865 | // Otherwise let the containment handle it. | ||
863 | event.accepted = false; | 866 | event.accepted = false; | ||
864 | } | 867 | } | ||
▲ Show 20 Lines • Show All 461 Lines • Show Last 20 Lines |