def _on_size_allocate(self, widget, allocation):
# FIXME: mvo: allocation.height is no longer accessable with gtk3
# THIS SEEMS TO BREAK THE ANIMATION
#height = allocation.height
height = widget.get_allocation().height
if self._is_sliding_in:
self._current_height = height
GObject.timeout_add(self.ANIMATE_STEP_INTERVAL,
self._slide_in_cb,
priority=100)
elif self._is_sliding_out:
self._current_height = height
GObject.timeout_add(self.ANIMATE_STEP_INTERVAL,
self._slide_out_cb,
priority=100)
else:
self.queue_draw()
评论列表
文章目录