Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 32 | Item { | |||
---|---|---|---|---|---|
51 | property alias layoutDirection: gridView.layoutDirection | 51 | property alias layoutDirection: gridView.layoutDirection | ||
52 | property alias cellWidth: gridView.cellWidth | 52 | property alias cellWidth: gridView.cellWidth | ||
53 | property alias cellHeight: gridView.cellHeight | 53 | property alias cellHeight: gridView.cellHeight | ||
54 | property alias overflowing: gridView.overflowing | 54 | property alias overflowing: gridView.overflowing | ||
55 | property alias scrollLeft: gridView.scrollLeft | 55 | property alias scrollLeft: gridView.scrollLeft | ||
56 | property alias scrollRight: gridView.scrollRight | 56 | property alias scrollRight: gridView.scrollRight | ||
57 | property alias scrollUp: gridView.scrollUp | 57 | property alias scrollUp: gridView.scrollUp | ||
58 | property alias scrollDown: gridView.scrollDown | 58 | property alias scrollDown: gridView.scrollDown | ||
59 | property alias hoveredItem: listener.hoveredItem | ||||
59 | property var history: [] | 60 | property var history: [] | ||
60 | property Item backButton: null | 61 | property Item backButton: null | ||
61 | 62 | | |||
62 | function rename() | 63 | function rename() | ||
63 | { | 64 | { | ||
64 | if (gridView.currentIndex != -1) { | 65 | if (gridView.currentIndex != -1) { | ||
65 | editor.targetItem = gridView.currentItem; | 66 | editor.targetItem = gridView.currentItem; | ||
66 | } | 67 | } | ||
67 | } | 68 | } | ||
68 | 69 | | |||
69 | function linkHere(sourceUrl) { | 70 | function linkHere(sourceUrl) { | ||
70 | dir.linkHere(sourceUrl); | 71 | dir.linkHere(sourceUrl); | ||
71 | } | 72 | } | ||
72 | 73 | | |||
74 | function itemAt(x, y) { | ||||
75 | var pos = mapToItem(gridView.contentItem, x, y); | ||||
76 | return gridView.itemAt(pos.x, pos.y); | ||||
77 | } | ||||
78 | | ||||
73 | function dropItemAt(pos) { | 79 | function dropItemAt(pos) { | ||
74 | var item = gridView.itemAt(pos.x, pos.y); | 80 | var item = gridView.itemAt(pos.x, pos.y); | ||
75 | 81 | | |||
76 | if (item) { | 82 | if (item) { | ||
77 | if (item.blank) { | 83 | if (item.blank) { | ||
78 | return -1; | 84 | return -1; | ||
79 | } | 85 | } | ||
80 | 86 | | |||
▲ Show 20 Lines • Show All 282 Lines • ▼ Show 20 Line(s) | 367 | if (!containsMouse && !main.rubberBand) { | |||
363 | 369 | | |||
364 | if (gridView.hoveredItem && !gridView.hoveredItem.popupDialog) { | 370 | if (gridView.hoveredItem && !gridView.hoveredItem.popupDialog) { | ||
365 | gridView.hoveredItem = null; | 371 | gridView.hoveredItem = null; | ||
366 | } | 372 | } | ||
367 | } | 373 | } | ||
368 | } | 374 | } | ||
369 | 375 | | |||
370 | onHoveredItemChanged: { | 376 | onHoveredItemChanged: { | ||
371 | doubleClickInProgress = false; | 377 | doubleClickInProgress = false;3 | ||
372 | } | 378 | } | ||
373 | 379 | | |||
374 | function pressCanceled() { | 380 | function pressCanceled() { | ||
375 | if (main.rubberBand) { | 381 | if (main.rubberBand) { | ||
376 | main.rubberBand.visible = false; | 382 | main.rubberBand.visible = false; | ||
377 | main.rubberBand.enabled = false; | 383 | main.rubberBand.enabled = false; | ||
378 | main.rubberBand.destroy(); | 384 | main.rubberBand.destroy(); | ||
379 | main.rubberBand = null; | 385 | main.rubberBand = null; | ||
▲ Show 20 Lines • Show All 749 Lines • Show Last 20 Lines |