[pitivi: 75/94] No more weird vertical movement of the Video: and Audio: labels when the number of timeline layers c



commit 53f68959645f9dc15689842b035d63b31609da41
Author: Alex BÄluÈ <alexandru balut gmail com>
Date:   Mon Sep 5 06:42:26 2011 +0200

    No more weird vertical movement of the Video: and Audio: labels when the number of timeline layers changes

 pitivi/ui/timelinecontrols.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/timelinecontrols.py b/pitivi/ui/timelinecontrols.py
index 607a20f..312f3b3 100644
--- a/pitivi/ui/timelinecontrols.py
+++ b/pitivi/ui/timelinecontrols.py
@@ -18,7 +18,11 @@ class TrackControls(gtk.Label):
 
     def __init__(self, track):
         gtk.Label.__init__(self)
-        self.set_alignment(0.5, 0.1)
+        # Center the label horizontally.
+        self.set_alignment(0.5, 0)
+        # The value below is arbitrarily chosen so the text appears
+        # centered vertically when the represented track has a single layer.
+        self.set_padding(0, LAYER_SPACING * 2)
         self.set_markup(self._getTrackName(track))
         self.track = track
         self._setSize(layers_count=1)



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