[pitivi: 9/11] timelinecanvas.py: paint theme-compliant background
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi: 9/11] timelinecanvas.py: paint theme-compliant background
- Date: Mon, 21 Sep 2009 09:56:08 +0000 (UTC)
commit c1ce19e9678d1d3462246098e92a72094885c270
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Wed Sep 2 11:55:28 2009 -0700
timelinecanvas.py: paint theme-compliant background
pitivi/ui/timelinecanvas.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index 0da5eb8..4f6284a 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -78,6 +78,8 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self._block_size_request = False
self.props.integer_layout = True
self.props.automatic_bounds = False
+ self.props.clear_background = False
+ self.get_root_item().set_simple_transform(0, 2.0, 1.0, 0)
self._createUI()
self.timeline = timeline
@@ -150,6 +152,19 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
return True
def do_expose_event(self, event):
+ allocation = self.get_allocation()
+ width = allocation.width
+ height = allocation.height
+ # draw the canvas background
+ # we must have props.clear_background set to False
+
+ self.style.apply_default_background(event.window,
+ True,
+ gtk.STATE_ACTIVE,
+ event.area,
+ event.area.x, event.area.y,
+ event.area.width, event.area.height)
+
goocanvas.Canvas.do_expose_event(self, event)
## implements selection marquee
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]