IconEditor/IconEditorWindow.py

changeset 5631
d0beabfaad42
parent 5406
8d09a23a8fdd
child 5651
982465f8389c
equal deleted inserted replaced
5630:11670490db05 5631:d0beabfaad42
1385 @param evt reference to the gesture event (QGestureEvent 1385 @param evt reference to the gesture event (QGestureEvent
1386 """ 1386 """
1387 pinch = evt.gesture(Qt.PinchGesture) 1387 pinch = evt.gesture(Qt.PinchGesture)
1388 if pinch: 1388 if pinch:
1389 if pinch.state() == Qt.GestureStarted: 1389 if pinch.state() == Qt.GestureStarted:
1390 pinch.setScaleFactor(self.__editor.zoomFactor() / 100.0) 1390 pinch.setTotalScaleFactor(self.__editor.zoomFactor() / 100.0)
1391 else: 1391 elif pinch.state() == Qt.GestureUpdated:
1392 self.__editor.setZoomFactor(int(pinch.scaleFactor() * 100)) 1392 self.__editor.setZoomFactor(int(pinch.totalScaleFactor() * 100))
1393 self.__updateZoom() 1393 self.__updateZoom()
1394 evt.accept() 1394 evt.accept()

eric ide

mercurial