[pitivi] elements: Fix TrimHandle's style
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] elements: Fix TrimHandle's style
- Date: Fri, 23 Oct 2015 17:11:43 +0000 (UTC)
commit 6d4f00c861a83a3818b139694414a47a703adda0
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Oct 22 16:21:28 2015 +0200
elements: Fix TrimHandle's style
It's not guaranteed that the left one is the first-child and the right
one is the last-child.
Differential Revision: https://phabricator.freedesktop.org/D438
pitivi/timeline/elements.py | 8 +++++++-
pitivi/utils/ui.py | 9 ++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 85371c5..bfb17c8 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -574,9 +574,15 @@ class TrimHandle(Gtk.EventBox, Loggable):
Loggable.__init__(self)
self.clip = clip
- self.get_style_context().add_class("Trimbar")
self.edge = edge
+ self.get_style_context().add_class("Trimbar")
+ if edge == GES.Edge.EDGE_END:
+ css_class = "right"
+ else:
+ css_class = "left"
+ self.get_style_context().add_class(css_class)
+
self.props.valign = Gtk.Align.FILL
self.shrink()
if edge == GES.Edge.EDGE_END:
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index 99a8d5f..2882059 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -70,7 +70,6 @@ LAYER_CREATION_BLOCK_TIME = 0.2
FILE_TARGET_ENTRY = Gtk.TargetEntry.new("text/plain", 0, 0)
URI_TARGET_ENTRY = Gtk.TargetEntry.new("text/uri-list", 0, 0)
EFFECT_TARGET_ENTRY = Gtk.TargetEntry.new("pitivi/effect", 0, 0)
-LAYER_CONTROL_TARGET_ENTRY = Gtk.TargetEntry.new("pitivi/layer-control", 0, 0)
def _get_settings(schema):
@@ -118,12 +117,12 @@ TIMELINE_CSS = """
opacity:0.5;
}
- .Trimbar:first-child {
- border-radius: 5px 0 0 5px;
+ .Trimbar.left {
+ border-radius: 5px 0px 0px 5px;
}
- .Trimbar:last-child {
- border-radius: 0 5px 5px 0;
+ .Trimbar.right {
+ border-radius: 0px 5px 5px 0px;
}
.Trimbar:hover {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]