[pitivi: 1/16] Add a "zoom fit" button near the zoom slider
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 1/16] Add a "zoom fit" button near the zoom slider
- Date: Tue, 22 Mar 2011 10:35:06 +0000 (UTC)
commit b6d4a5cf10f0ffd9615c66f338459ac8bbb7f46f
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Wed Dec 1 13:12:43 2010 -0500
Add a "zoom fit" button near the zoom slider
pitivi/ui/timeline.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 56eeca8..34be026 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -230,6 +230,14 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.hadj = gtk.Adjustment()
self.vadj = gtk.Adjustment()
+ # zooming slider's "zoom fit" button
+ zoom_controls_hbox = gtk.HBox()
+ zoom_best_fit_button = gtk.Button(_("Zoom"))
+ zoom_best_fit_button.set_relief(gtk.RELIEF_NONE)
+ zoom_best_fit_button.set_tooltip_text(_("Zoom fit"))
+ zoom_best_fit_button.set_image(gtk.image_new_from_stock(gtk.STOCK_ZOOM_FIT, gtk.ICON_SIZE_BUTTON))
+ zoom_best_fit_button.connect("clicked", self._zoomFitCb)
+ zoom_controls_hbox.pack_start(zoom_best_fit_button)
# zooming slider
self._zoomAdjustment = gtk.Adjustment()
self._zoomAdjustment.set_value(Zoomable.getCurrentZoomLevel())
@@ -241,7 +249,8 @@ class Timeline(gtk.Table, Loggable, Zoomable):
zoomslider.props.draw_value = False
zoomslider.set_tooltip_text(_("Zoom Timeline"))
zoomslider.connect("scroll-event", self._zoomSliderScrollCb)
- self.attach(zoomslider, 0, 1, 0, 1, yoptions=0, xoptions=gtk.FILL)
+ zoom_controls_hbox.pack_start(zoomslider)
+ self.attach(zoom_controls_hbox, 0, 1, 0, 1, yoptions=0, xoptions=gtk.FILL)
# controls for tracks and layers
self._controls = TimelineControls()
@@ -737,6 +746,9 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.actiongroup.set_visible(False)
gtk.Vbox.hide(self)
+ def _zoomFitCb(self, unused_action):
+ pass
+
def _zoomInCb(self, unused_action):
Zoomable.zoomIn()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]