Added additional scroll functionality
This commit is contained in:
parent
7d30a678ca
commit
29b32a9dc3
|
@ -130,8 +130,19 @@ class ImageViewScroll(Gtk.ScrolledWindow):
|
||||||
adjustment.set_value(current_val - step_val)
|
adjustment.set_value(current_val - step_val)
|
||||||
else: # NOTE: scroll right
|
else: # NOTE: scroll right
|
||||||
adjustment.set_value(current_val + step_val)
|
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:
|
else:
|
||||||
if direction > 0:
|
if direction > 0:
|
||||||
event_system.emit("zoom_out")
|
event_system.emit("zoom_out")
|
||||||
else:
|
else:
|
||||||
event_system.emit("zoom_in")
|
event_system.emit("zoom_in")
|
||||||
|
|
||||||
|
return True # NOTE: Stop event propigation
|
||||||
|
|
Loading…
Reference in New Issue