diff --git a/shell/view/frame/frame.py b/shell/view/frame/frame.py index e5883ece..6cc2a173 100644 --- a/shell/view/frame/frame.py +++ b/shell/view/frame/frame.py @@ -31,7 +31,7 @@ from model.ShellModel import ShellModel from sugar.graphics.timeline import Timeline from sugar.graphics import units -_ANIMATION = False +_ANIMATION = True class Frame: INACTIVE = 0 @@ -132,7 +132,7 @@ class Frame: x = (x2 - x1) * pos + x1 y = (y2 - y1) * pos + y1 - panel.move(x, y) + panel.move(int(x), int(y)) # FIXME we should hide and show as necessary to free memory if not panel.props.visible: @@ -172,7 +172,8 @@ class Frame: def _enter_notify(self): self._hover_frame = True - self._timeline.goto('slide_in', True) + if not self._timeline.on_tag('slide_in'): + self._timeline.goto('slide_in', True) def _leave_notify(self, panel): self._hover_frame = False diff --git a/sugar/graphics/timeline.py b/sugar/graphics/timeline.py index 013687d8..7f26246a 100644 --- a/sugar/graphics/timeline.py +++ b/sugar/graphics/timeline.py @@ -68,7 +68,7 @@ class Timeline: else: self._current_frame = tag.start_frame - self._next_frame(tag, self._current_frame) + self._next_frame(tag, self._current_frame - tag.start_frame) def on_tag(self, name): tag = self._name_to_tag[name]