Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def on_vscrollbar_event_after(self, vscrollbar, event, anchor):
- """Catches CodeBox Vertical Scrollbar Movements"""
- if not self.dad.user_active or self.curr_codebox_anchor != anchor: return False
- if self.dad.codebox_auto_resize and event.type == gtk.gdk.EXPOSE:
- curr_v = vscrollbar.get_value()
- #print curr_v+vscrollbar.get_adjustment().page_size, vscrollbar.get_adjustment().upper
- if curr_v and ((curr_v+vscrollbar.get_adjustment().page_size) >= (vscrollbar.get_adjustment().upper-20)) and (vscrollbar.get_adjustment().page_size > curr_v):
- # 1) the scrollbar is visible
- # 2) we are at the scrolling end
- # 3) the scrolling area is little, this step will probably cause the scrollbar to hide again
- self.curr_v = curr_v
- if not self.dad.codebox_sentinel_id: self.dad.codebox_sentinel_start()
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement