[pitivi] curve.py: draw focused keyframe in inverted colors
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] curve.py: draw focused keyframe in inverted colors
- Date: Wed, 19 Aug 2009 09:30:07 +0000 (UTC)
commit 6420d3c13f748ed44e6ce2a7ae80e573b19b7aed
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Mon Aug 17 13:57:14 2009 -0700
curve.py: draw focused keyframe in inverted colors
pitivi/ui/curve.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index 6a7f173..4b60c1d 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -214,6 +214,13 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
cr.fill_preserve()
cr.set_source_rgb(1, 0, 0)
cr.stroke()
+ # re-draw the focused keyframe, if it exists, inverted
+ if self._focused_kf:
+ self._controlPoint(cr, self._focused_kf)
+ cr.set_source_rgb(1, 0, 0)
+ cr.fill_preserve()
+ cr.set_source_rgb(1, 1, 1)
+ cr.stroke()
def make_curve(self, cr):
if not self.interpolator:
@@ -240,12 +247,18 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
## public
+ def setFocusedKf(self, kf):
+ if self._focused_kf is not kf:
+ self.changed(False)
+ self._focused_kf = kf
+
def focus(self):
self.line_width = CURVE_STROKE_WIDTH * 1.5
self.changed(False)
def normal(self):
self.line_width = CURVE_STROKE_WIDTH
+ self.setFocusedKf(None)
self.changed(False)
def findKeyframe(self, pos):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]