Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Line(s) | 331 | onPositionChanged: { | |||
---|---|---|---|---|---|
332 | gridView.ctrlPressed = (mouse.modifiers & Qt.ControlModifier); | 332 | gridView.ctrlPressed = (mouse.modifiers & Qt.ControlModifier); | ||
333 | gridView.shiftPressed = (mouse.modifiers & Qt.ShiftModifier); | 333 | gridView.shiftPressed = (mouse.modifiers & Qt.ShiftModifier); | ||
334 | 334 | | |||
335 | var cPos = mapToItem(gridView.contentItem, mouse.x, mouse.y); | 335 | var cPos = mapToItem(gridView.contentItem, mouse.x, mouse.y); | ||
336 | var item = gridView.itemAt(cPos.x, cPos.y); | 336 | var item = gridView.itemAt(cPos.x, cPos.y); | ||
337 | var leftEdge = Math.min(gridView.contentX, gridView.originX); | 337 | var leftEdge = Math.min(gridView.contentX, gridView.originX); | ||
338 | 338 | | |||
339 | if (!item || item.blank) { | 339 | if (!item || item.blank) { | ||
340 | if (gridView.hoveredItem && !root.containsDrag && (!dialog || !dialog.containsDrag)) { | ||||
340 | gridView.hoveredItem = null; | 341 | gridView.hoveredItem = null; | ||
342 | } | ||||
341 | } else { | 343 | } else { | ||
342 | var fPos = mapToItem(item.frame, mouse.x, mouse.y); | 344 | var fPos = mapToItem(item.frame, mouse.x, mouse.y); | ||
343 | 345 | | |||
344 | if (fPos.x < 0 || fPos.y < 0 || fPos.x > item.frame.width || fPos.y > item.frame.height) { | 346 | if (fPos.x < 0 || fPos.y < 0 || fPos.x > item.frame.width || fPos.y > item.frame.height) { | ||
345 | gridView.hoveredItem = null; | 347 | gridView.hoveredItem = null; | ||
346 | } | 348 | } | ||
347 | } | 349 | } | ||
348 | 350 | | |||
▲ Show 20 Lines • Show All 900 Lines • Show Last 20 Lines |