[pitivi] curve.py, trackobject.py: fix curve hitbox detection issues curve.py: make keyframes larger again
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] curve.py, trackobject.py: fix curve hitbox detection issues curve.py: make keyframes larger again
- Date: Fri, 22 Jan 2010 18:04:06 +0000 (UTC)
commit 660aab6c93230aa25b16eafa29f8c3a966d14ba9
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Tue Jan 5 10:52:49 2010 -0800
curve.py, trackobject.py: fix curve hitbox detection issues
curve.py: make keyframes larger again
closes bugs 603425, 603107
pitivi/ui/curve.py | 6 ++++--
pitivi/ui/trackobject.py | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index c2bd39b..47f79a7 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -39,8 +39,8 @@ def intersect(b1, b2):
return goocanvas.Bounds(max(b1.x1, b2.x1), max(b1.y1, b2.y1),
min(b1.x2, b2.x2), min(b1.y2, b2.y2))
-KW_WIDTH = 7
-KW_HEIGHT = 7
+KW_WIDTH = 10
+KW_HEIGHT = 10
KW_WIDTH2 = KW_WIDTH / 2
KW_HEIGHT2 = KW_HEIGHT / 2
KW_MOUSE_WIDTH = KW_WIDTH2 + 1
@@ -245,7 +245,9 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
between(0, y, self.height)):
x += self.bounds.x1
y += self.bounds.y1
+ cr.new_path()
self.make_curve(cr)
+ self.make_keyframes(cr)
cr.set_line_width(10.0)
return cr.in_stroke(x, y) or bool(self.findKeyframe((x, y)))
return False
diff --git a/pitivi/ui/trackobject.py b/pitivi/ui/trackobject.py
index 5e594dd..c4d686b 100644
--- a/pitivi/ui/trackobject.py
+++ b/pitivi/ui/trackobject.py
@@ -100,7 +100,6 @@ class TimelineController(controller.Controller):
_handle_enter_leave = False
def enter(self, unused, unused2):
- self._view.raise_(None)
self._view.focus()
def leave(self, unused, unused2):
@@ -326,6 +325,7 @@ class TrackObject(View, goocanvas.Group, Zoomable):
def focus(self):
self.start_handle.props.visibility = goocanvas.ITEM_VISIBLE
self.end_handle.props.visibility = goocanvas.ITEM_VISIBLE
+ self.raise_(None)
def unfocus(self):
self.start_handle.props.visibility = goocanvas.ITEM_INVISIBLE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]