grid: raise drag-start threshold to 30px to match rubber band
Thumbnail file drag kicked off after only 10px of movement, which made it too easy to start a drag when the user meant to rubber-band select or just click-and-micro-wobble. Bumped to 30px so the gate matches the rubber band's own threshold in `_maybe_start_rb`. behavior change: tiny mouse movement on a thumbnail no longer starts a file drag; you now need to drag ~30px before the OS drag kicks in.
This commit is contained in:
parent
21bb3aa979
commit
3b3de35689
@ -302,7 +302,7 @@ class ThumbnailWidget(QWidget):
|
|||||||
self.setCursor(Qt.CursorShape.PointingHandCursor if over else Qt.CursorShape.ArrowCursor)
|
self.setCursor(Qt.CursorShape.PointingHandCursor if over else Qt.CursorShape.ArrowCursor)
|
||||||
self.update()
|
self.update()
|
||||||
if (self._drag_start and self._cached_path
|
if (self._drag_start and self._cached_path
|
||||||
and (event.position().toPoint() - self._drag_start).manhattanLength() > 10):
|
and (event.position().toPoint() - self._drag_start).manhattanLength() > 30):
|
||||||
drag = QDrag(self)
|
drag = QDrag(self)
|
||||||
mime = QMimeData()
|
mime = QMimeData()
|
||||||
mime.setUrls([QUrl.fromLocalFile(self._cached_path)])
|
mime.setUrls([QUrl.fromLocalFile(self._cached_path)])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user