Commit c58c65c0 authored by Immanuel Weber's avatar Immanuel Weber
Browse files

add midlemousebutton scrolling

parent 7b3296ba
......@@ -195,6 +195,12 @@ class MainWindow(QMainWindow, WindowMixin):
self.scrollArea = scroll
self.canvas.scrollRequest.connect(self.scrollRequest)
QScroller.grabGesture(scroll.viewport(), QScroller.MiddleMouseButtonGesture)
properties = QScroller.scroller(scroll.viewport()).scrollerProperties()
properties.setScrollMetric(QScrollerProperties.VerticalOvershootPolicy, QScrollerProperties.OvershootAlwaysOff)
properties.setScrollMetric(QScrollerProperties.OvershootScrollTime, 0.2)
QScroller.scroller(scroll.viewport()).setScrollerProperties(properties)
self.canvas.newShape.connect(self.newShape)
self.canvas.shapeMoved.connect(self.setDirty)
self.canvas.selectionChanged.connect(self.shapeSelectionChanged)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment