[pitivi: 6/12] timelinecanvas.py: cosmetic tweaks for playhead to improve appearance
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi: 6/12] timelinecanvas.py: cosmetic tweaks for playhead to improve appearance
- Date: Tue, 1 Dec 2009 22:01:48 +0000 (UTC)
commit 9ff36b648cc989fd0d10025d84c7076dc5af3203
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Wed Nov 25 12:19:14 2009 -0800
timelinecanvas.py: cosmetic tweaks for playhead to improve appearance
pitivi/ui/timelinecanvas.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index 0d03ad0..7fb1069 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -107,10 +107,12 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
fill_pattern = unpack_cairo_pattern(0x33CCFF66),
visibility = goocanvas.ITEM_INVISIBLE)
self._playhead = goocanvas.Rect(
+ y = -10,
parent=root,
- line_width=0,
- fill_color="red",
- width=1)
+ line_width=0.5,
+ fill_color_rgba=0xFF0000FF,
+ stroke_color_rgba=0xFFFFFFFF,
+ width=2)
self._playhead_controller = PlayheadController(self._playhead)
self._playhead_controller.seeker.connect("seek", self.seekerSeekCb)
root.connect("motion-notify-event", self._selectionDrag)
@@ -283,11 +285,11 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self._request_size()
def _request_size(self):
+ alloc = self.get_allocation()
w = Zoomable.nsToPixel(self.max_duration)
- self.set_bounds(0, 0, w, self._height)
- self._playhead.props.height = self._height
-
-## Zoomable Override
+ h = max(self._height, alloc.height)
+ self.set_bounds(0, 0, w, h)
+ self._playhead.props.height = h + 10
def zoomChanged(self):
if self.timeline:
@@ -295,7 +297,6 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self.settings.edgeSnapDeadband)
self._request_size()
-
## settings callbacks
def _setSettings(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]