[pitivi] Beautify the timeline clip keyframes and curves
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Beautify the timeline clip keyframes and curves
- Date: Wed, 18 Nov 2015 21:13:39 +0000 (UTC)
commit acdcde42dd37309e6a5c753b433d3b349879c7d1
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Sun Nov 15 23:46:57 2015 -0500
Beautify the timeline clip keyframes and curves
Use standard Tango colors for the lines and keyframes,
with some transparency, and use a bigger stroke width.
The bigger stroke width compensates for transparency
and helps smooth out diagonal lines.
pitivi/timeline/elements.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 8aa2579..e6aa4c0 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -48,7 +48,8 @@ from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas
import numpy
-KEYFRAME_LINE_COLOR = (237, 212, 0) # "Tango" yellow
+KEYFRAME_LINE_COLOR = "#EDD400" # "Tango" medium yellow
+KEYFRAME_NODE_COLOR = "#F57900" # "Tango" medium orange
CURSORS = {
GES.Edge.EDGE_START: Gdk.Cursor.new(Gdk.CursorType.LEFT_SIDE),
@@ -110,15 +111,14 @@ class KeyframeCurve(FigureCanvas, Loggable):
self.__keyframes = None
sizes = [50]
- colors = ['r']
-
self.__keyframes = self.__ax.scatter([], [], marker='D', s=sizes,
- c=colors, zorder=2)
+ c=KEYFRAME_NODE_COLOR, zorder=2)
# matplotlib weirdness, simply here to avoid a warning ..
self.__keyframes.set_picker(True)
- self.__line = self.__ax.plot([], [],
- linewidth=1.0, zorder=1)[0]
+
+ self.__line = self.__ax.plot([], [], alpha=0.5, c=KEYFRAME_LINE_COLOR,
+ linewidth=1.5, zorder=1)[0]
self.__updatePlots()
# Drag and drop logic
@@ -132,8 +132,7 @@ class KeyframeCurve(FigureCanvas, Loggable):
self.connect("event", self._eventCb)
self.mpl_connect('button_press_event', self.__mplButtonPressEventCb)
- self.mpl_connect(
- 'button_release_event', self.__mplButtonReleaseEventCb)
+ self.mpl_connect('button_release_event', self.__mplButtonReleaseEventCb)
self.mpl_connect('motion_notify_event', self.__mplMotionEventCb)
# Private methods
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]