Use the correct margin settings
This commit is contained in:
@@ -1402,11 +1402,11 @@ class GuiProjectTree(QTreeWidget):
|
|||||||
def dragMoveEvent(self, event: QDragMoveEvent) -> None:
|
def dragMoveEvent(self, event: QDragMoveEvent) -> None:
|
||||||
"""Capture the drag move event to enable edge autoscroll."""
|
"""Capture the drag move event to enable edge autoscroll."""
|
||||||
y = event.pos().y()
|
y = event.pos().y()
|
||||||
if y < 16:
|
if y < self._scrollMargin:
|
||||||
if not self._scrollTimer.isActive():
|
if not self._scrollTimer.isActive():
|
||||||
self._scrollDirection = -1
|
self._scrollDirection = -1
|
||||||
self._scrollTimer.start()
|
self._scrollTimer.start()
|
||||||
elif y > self.height() - 16:
|
elif y > self.height() - self._scrollMargin:
|
||||||
if not self._scrollTimer.isActive():
|
if not self._scrollTimer.isActive():
|
||||||
self._scrollDirection = 1
|
self._scrollDirection = 1
|
||||||
self._scrollTimer.start()
|
self._scrollTimer.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user