OSDN Git Service

propagate the scroll event from threadview to vscrollbar
[fukui-no-namari/fukui-no-namari.git] / src / FukuiNoNamari / thread_view.py
index 320d6c9..76bf0c6 100644 (file)
@@ -241,16 +241,7 @@ class ThreadView(gtk.HBox):
         self.drawingarea.queue_draw()
 
     def on_drawingarea_scroll_event(self, widget, event, data=None):
-        if event.direction == gtk.gdk.SCROLL_UP:
-            self.adjustment.value -= 66.476200804
-            if self.adjustment.value < self.adjustment.lower:
-                self.adjustment.value = self.adjustment.lower
-        if event.direction == gtk.gdk.SCROLL_DOWN:
-            self.adjustment.value += 66.476200804
-            max_value = self.adjustment.upper - self.adjustment.page_size
-            if self.adjustment.value > max_value:
-                self.adjustment.value = max_value
-        self.prevent_adjustment_overflow()
+        self.vscrollbar.emit("scroll-event", event)
 
     def on_drawingrarea_motion_notify_event(self, widget, event, data=None):
         if event.state & gtk.gdk.BUTTON1_MASK != gtk.gdk.BUTTON1_MASK: