[pitivi] elements: Fix video clips keyframes and lines vertical position
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] elements: Fix video clips keyframes and lines vertical position
- Date: Fri, 28 Feb 2014 03:14:10 +0000 (UTC)
commit 54408036318a624b4ccade928dcc4fdbe93b74b9
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Feb 26 17:57:21 2014 +0100
elements: Fix video clips keyframes and lines vertical position
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711168
pitivi/timeline/elements.py | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 38de53c..dc4132e 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -453,8 +453,7 @@ class TimelineElement(Clutter.Actor, Zoomable):
def setKeyframePosition(self, keyframe, value):
x = self.nsToPixel(value.timestamp - self.bElement.props.in_point) - KEYFRAME_SIZE / 2
- y = EXPANDED_SIZE - (value.value * EXPANDED_SIZE)
-
+ y = EXPANDED_SIZE - (value.value * EXPANDED_SIZE) - KEYFRAME_SIZE / 2
keyframe.set_position(x, y)
def drawLines(self, line=None):
@@ -549,12 +548,6 @@ class TimelineElement(Clutter.Actor, Zoomable):
self.hideKeyframes()
- def _setKeyframePosition(self, keyframe, value):
- x = self.nsToPixel(value.timestamp - self.bElement.props.in_point) - KEYFRAME_SIZE / 2
- y = EXPANDED_SIZE - (value.value * EXPANDED_SIZE)
-
- keyframe.set_position(x, y)
-
def _createKeyframe(self, value, has_changeable_time):
keyframe = Keyframe(self, value, has_changeable_time)
self.insert_child_above(keyframe, self._keyframesMarker)
@@ -578,8 +571,8 @@ class TimelineElement(Clutter.Actor, Zoomable):
line.props.width = hyp
line.props.height = KEYFRAME_SIZE
line.props.rotation_angle_z = math.degrees(math.asin(sinX))
- line.props.x = self.nsToPixel(lastKeyframe.value.timestamp - self.bElement.props.in_point)
- line.props.y = EXPANDED_SIZE - (EXPANDED_SIZE * lastKeyframe.value.value)
+ line.props.x = self.nsToPixel(lastKeyframe.value.timestamp - self.bElement.props.in_point) -
KEYFRAME_SIZE / 2
+ line.props.y = EXPANDED_SIZE - (EXPANDED_SIZE * lastKeyframe.value.value) - KEYFRAME_SIZE / 2
line.canvas.invalidate()
def _createGhostclip(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]