Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-02-27 16:04:15 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-02-27 16:04:15 (GMT)
commit7081909d2d959ae1deb973d216e72fa7934a1050 (patch)
treef42bac44bed9e995417e314d908ad6b866f4f325
parente478de42247d41d4439af9d7fd4fac0321f063da (diff)
Fix some bugs with frame animation and enable it
-rw-r--r--shell/view/frame/frame.py7
-rw-r--r--sugar/graphics/timeline.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/shell/view/frame/frame.py b/shell/view/frame/frame.py
index e5883ec..6cc2a17 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 013687d..7f26246 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]