Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 318 Lines • ▼ Show 20 Line(s) | 316 | onPositionChanged: { | |||
---|---|---|---|---|---|
319 | 319 | | |||
320 | var cPos = mapToItem(gridView.contentItem, mouse.x, mouse.y); | 320 | var cPos = mapToItem(gridView.contentItem, mouse.x, mouse.y); | ||
321 | var item = gridView.itemAt(cPos.x, cPos.y); | 321 | var item = gridView.itemAt(cPos.x, cPos.y); | ||
322 | var leftEdge = Math.min(gridView.contentX, gridView.originX); | 322 | var leftEdge = Math.min(gridView.contentX, gridView.originX); | ||
323 | 323 | | |||
324 | if (!item || item.blank) { | 324 | if (!item || item.blank) { | ||
325 | gridView.hoveredItem = null; | 325 | gridView.hoveredItem = null; | ||
326 | } else { | 326 | } else { | ||
327 | var aPos = mapToItem(item.actionsOverlay, mouse.x, mouse.y); | 327 | var fPos = mapToItem(item.frame, mouse.x, mouse.y); | ||
328 | var hPos = mapToItem(item.hoverArea, mouse.x, mouse.y); | | |||
329 | 328 | | |||
330 | if ((hPos.x < 0 || hPos.y < 0 || hPos.x > item.hoverArea.width || hPos.y > item.hoverArea.height) | 329 | if (fPos.x < 0 || fPos.y < 0 || fPos.x > item.frame.width || fPos.y > item.frame.height) { | ||
331 | && aPos.x < 0) { | | |||
332 | gridView.hoveredItem = null; | 330 | gridView.hoveredItem = null; | ||
333 | } | 331 | } | ||
334 | } | 332 | } | ||
335 | 333 | | |||
336 | // Trigger autoscroll. | 334 | // Trigger autoscroll. | ||
337 | if (pressX != -1) { | 335 | if (pressX != -1) { | ||
338 | gridView.scrollLeft = (mouse.x <= 0 && gridView.contentX > leftEdge); | 336 | gridView.scrollLeft = (mouse.x <= 0 && gridView.contentX > leftEdge); | ||
339 | gridView.scrollRight = (mouse.x >= gridView.width | 337 | gridView.scrollRight = (mouse.x >= gridView.width | ||
▲ Show 20 Lines • Show All 883 Lines • Show Last 20 Lines |