@@ -2703,6 +2703,12 @@ def centerOnPlayhead(self):
2703
2703
# Execute JavaScript to center the timeline
2704
2704
self .run_js (JS_SCOPE_SELECTOR + '.centerOnPlayhead();' )
2705
2705
2706
+ @pyqtSlot ()
2707
+ def scrollLeft (self , scroll_value ):
2708
+ """ --------------------------- """
2709
+ # Execute JavaScript to -----------------
2710
+ self .run_js (JS_SCOPE_SELECTOR + '.scrollLeft(%s);' % int (scroll_value ))
2711
+
2706
2712
@pyqtSlot (int )
2707
2713
def SetSnappingMode (self , enable_snapping ):
2708
2714
""" Enable / Disable snapping mode """
@@ -2781,13 +2787,18 @@ def update_zoom(self, newValue):
2781
2787
get_app ().updates .update (["scale" ], newScale )
2782
2788
get_app ().updates .ignore_history = False
2783
2789
2784
- # Capture wheel event to alter zoom slider control
2790
+ # Capture wheel event to alter zoom slider control or to use SHIFT+scroll for horizontal scroll
2785
2791
def wheelEvent (self , event ):
2786
2792
if int (QCoreApplication .instance ().keyboardModifiers () & Qt .ControlModifier ) > 0 :
2787
2793
# For each 120 (standard scroll unit) adjust the zoom slider
2788
2794
tick_scale = 120
2789
2795
steps = int (event .angleDelta ().y () / tick_scale )
2790
2796
self .window .sliderZoom .setValue (self .window .sliderZoom .value () - self .window .sliderZoom .pageStep () * steps )
2797
+ elif int (QCoreApplication .instance ().keyboardModifiers () & Qt .ShiftModifier ) > 0 :
2798
+ # For each 120 (standard scroll unit) scroll horizontally
2799
+ tick_scale = 120
2800
+ steps = int (event .angleDelta ().y () / tick_scale )
2801
+ self .scrollLeft (- steps * 100 )
2791
2802
else :
2792
2803
# Otherwise pass on to implement default functionality (scroll in QWebEngineView)
2793
2804
super (type (self ), self ).wheelEvent (event )
0 commit comments