pitivi r1155 - in branches/SOC_2008_BLEWIS: . pitivi/ui
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1155 - in branches/SOC_2008_BLEWIS: . pitivi/ui
- Date: Mon, 7 Jul 2008 12:11:55 +0000 (UTC)
Author: edwardrv
Date: Mon Jul 7 12:11:55 2008
New Revision: 1155
URL: http://svn.gnome.org/viewvc/pitivi?rev=1155&view=rev
Log:
* pitivi/ui/complextimeline.py:
Fix canvas bounds settings so that we don't redraw the canvas all the
time.
Modified:
branches/SOC_2008_BLEWIS/ChangeLog
branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py
Modified: branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py
==============================================================================
--- branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py (original)
+++ branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py Mon Jul 7 12:11:55 2008
@@ -191,10 +191,16 @@
for layer in self.layers:
layer.bg.props.width = width
- def _request_size(self, item, prop):
- self.set_size_request(int(self.layers.width), int(
- self.layers.height))
- self.set_bounds(0, 0, self.layers.width, self.layers.height)
+ def _request_size(self, unused_item, prop):
+ # we only update the bounds of the canvas by chunks of 100 pixels
+ # in width, otherwise we would always be redrawing the whole canvas.
+ w = ((int(self.layers.width) / 100) + 1 ) * 100
+ h = int(self.layers.height)
+ x1,y1,x2,y2 = self.get_bounds()
+ pw = abs(x2 - x1)
+ ph = abs(y2 - y1)
+ if not (w == pw and h == ph):
+ self.set_bounds(0, 0, float(w), float(h))
return True
def _createUI(self):
@@ -209,7 +215,7 @@
## ZoomableWidgetInterface overrides
def getDuration(self):
- return max([layer.composition.duration for layer in
+ return max([layer.composition.duration for layer in
self.layerInfoList])
def getStartTime(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]