[pitivi] elements: Remove margins between clips
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] elements: Remove margins between clips
- Date: Wed, 16 Sep 2015 15:49:21 +0000 (UTC)
commit 871079b8cc85971877cf1c2cb75441c590c6edc0
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Tue Jul 7 15:13:09 2015 +0200
elements: Remove margins between clips
Summary: Fixes https://bugzilla.gnome.org/show_bug.cgi?id=751245
Reviewers: Mathieu_Du, aleb
Differential Revision: https://phabricator.freedesktop.org/D248
pitivi/timeline/elements.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 021050b..5ebce0e 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -640,8 +640,13 @@ class Clip(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
if not parent or not self.layer:
return
- x = self.nsToPixel(self.bClip.props.start)
- width = self.nsToPixel(self.bClip.props.duration)
+ start = self.bClip.props.start
+ duration = self.bClip.props.duration
+ x = self.nsToPixel(start)
+ # The calculation of the width assumes that the start is always
+ # int(pixels_float). In that case, the rounding can add up and a pixel
+ # might be lost if we ignore the start of the clip.
+ width = self.nsToPixel(start + duration) - x
parent_height = parent.get_allocated_height()
height, y = self.__computeHeightAndY()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]