[pitivi] layer: Better separate the Layer control zone from the actual timeline.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] layer: Better separate the Layer control zone from the actual timeline.
- Date: Wed, 8 Jul 2015 10:02:58 +0000 (UTC)
commit 81cd9777609f84cfa6ae7e7e14a9310aa7ef11fe
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Jul 3 16:43:41 2015 +0200
layer: Better separate the Layer control zone from the actual timeline.
pitivi/timeline/layer.py | 21 ++++++++++++++-------
pitivi/timeline/timeline.py | 2 ++
2 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index e82a8e2..2fc24f0 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -224,22 +224,28 @@ class LayerControls(Gtk.Bin, Loggable):
self.add(ebox)
self._vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self._hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
- ebox.add(self._hbox)
+ self._sepbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
+ ebox.add(self._sepbox)
self.bLayer = bLayer
self.app = app
- sep = SpacedSeparator()
- self._vbox.pack_start(sep, False, False, 0)
+ sep = Gtk.Separator.new(Gtk.Orientation.HORIZONTAL)
+ sep.props.height_request = ui.PADDING
+ self._sepbox.pack_start(sep, False, False, 0)
+
+ self._sepbox.pack_start(self._hbox, False, False, 0)
menubutton = Gtk.MenuButton.new()
+ menubutton.props.valign = Gtk.Align.START
+ menubutton.props.margin_top = 3 * ui.PADDING
model, action_group = self.__createMenuModel()
popover = Gtk.Popover.new_from_model(menubutton, model)
popover.insert_action_group("layer", action_group)
menubutton.set_popover(popover)
menubutton.props.direction = Gtk.ArrowType.RIGHT
- self._hbox.add(menubutton)
self._hbox.add(self._vbox)
+ self._hbox.pack_end(menubutton, False, False, ui.PADDING)
popover.props.position = Gtk.PositionType.LEFT
self.video_control = VideoLayerControl(None, self, self.app)
@@ -252,9 +258,6 @@ class LayerControls(Gtk.Bin, Loggable):
self.audio_control.props.height_request = ui.LAYER_HEIGHT / 2
self._vbox.add(self.audio_control)
- sep = SpacedSeparator()
- self._vbox.pack_start(sep, False, False, 0)
-
self._vbox.props.vexpand = False
self.props.width_request = ui.CONTROL_WIDTH
self.props.height_request = ui.LAYER_HEIGHT
@@ -264,6 +267,10 @@ class LayerControls(Gtk.Bin, Loggable):
ebox.connect("notify::window", self._windowSetCb)
+ sep = Gtk.Separator.new(Gtk.Orientation.HORIZONTAL)
+ sep.props.height_request = ui.PADDING
+ self._sepbox.pack_start(sep, False, False, 0)
+
def _windowSetCb(self, window, pspec):
self.props.window.set_cursor(Gdk.Cursor.new(Gdk.CursorType.HAND1))
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 233c57e..b1f4abe 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -233,6 +233,8 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
viewport_style.remove_class(css_class)
self._main_hbox.pack_start(viewport, False, False, 0)
+ self._main_hbox.pack_start(Gtk.Separator.new(Gtk.Orientation.VERTICAL), False, False, 0)
+
self._main_hbox.pack_start(self.layout, False, True, 0)
self.get_style_context().add_class("Timeline")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]