Added additional scroll functionality

This commit is contained in:
itdominator 2023-04-28 19:54:09 -05:00
parent 7d30a678ca
commit 29b32a9dc3
1 changed files with 11 additions and 0 deletions

View File

@ -130,8 +130,19 @@ class ImageViewScroll(Gtk.ScrolledWindow):
adjustment.set_value(current_val - step_val)
else: # NOTE: scroll right
adjustment.set_value(current_val + step_val)
elif event.state & accel_mask == Gdk.ModifierType.SHIFT_MASK:
adjustment = self.get_vadjustment()
current_val = adjustment.get_value()
step_val = adjustment.get_step_increment()
if direction > 0: # NOTE: scroll up
adjustment.set_value(current_val + step_val)
else: # NOTE: scroll down
adjustment.set_value(current_val - step_val)
else:
if direction > 0:
event_system.emit("zoom_out")
else:
event_system.emit("zoom_in")
return True # NOTE: Stop event propigation