[pitivi] elements: Make sure the keyframe widget is transparent



commit 2c0e20a13c02c4560e3611d20ff7b8997bcc4602
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Jan 15 20:32:23 2016 +0100

    elements: Make sure the keyframe widget is transparent
    
    On themes like Greybird the widgets have a background when they are
    selected. This has the effect of hiding the clip.
    
    Fixes https://phabricator.freedesktop.org/T3503
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D676

 pitivi/timeline/elements.py |    4 +++-
 pitivi/utils/ui.py          |    4 ++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index a0e47e7..f398ef7 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -101,6 +101,7 @@ class KeyframeCurve(FigureCanvas, Loggable):
         self.__source.connect("value-changed", self.__controlSourceChangedCb)
         self.__propertyName = binding.props.name
         self.__resetTooltip()
+        self.get_style_context().add_class("KeyframeCurve")
 
         self.__ylim_min, self.__ylim_max = KeyframeCurve.YLIM_OVERRIDES.get(
             binding.pspec, (0.0, 1.0))
@@ -341,7 +342,8 @@ class TimelineElement(Gtk.Layout, timelineUtils.Zoomable, Loggable):
         self._bElement.selected.connect(
             "selected-changed", self.__selectedChangedCb)
 
-        self.__width = self.__height = 0
+        self.__width = 0
+        self.__height = 0
 
         # Needed for effect's keyframe toggling
         self._bElement.ui_element = self
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index 2882059..c73426c 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -112,6 +112,10 @@ TIMELINE_CSS = """
         background-color: #0f0f0f;
     }
 
+    .KeyframeCurve {
+        background-color: rgba(0, 0, 0, 0);
+    }
+
     .Trimbar {
         background-image: url('%(trimbar_normal)s');
         opacity:0.5;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]