summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2013-11-15 18:08:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-18 12:44:06 +0000
commitcacd502cd389ea15ea1fb0947d3b033b39e5ad87 (patch)
tree85a3831163b561081a32d725619b007113acc3f8 /scripts
parentd0e513d4371789d59bcb902497ca7c537a94c1f0 (diff)
downloadpoky-cacd502cd389ea15ea1fb0947d3b033b39e5ad87.tar.gz
pybootchartgui: Make the horizontal scaling stay within bounds
(From OE-Core rev: 50c2c3435915ef1ecbde395c71c5c9581c83fb2e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/gui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py
index ddeb88cd9b..164bdfbd3a 100644
--- a/scripts/pybootchartgui/pybootchartgui/gui.py
+++ b/scripts/pybootchartgui/pybootchartgui/gui.py
@@ -101,10 +101,10 @@ class PyBootchartWidget(gtk.DrawingArea):
101 self.zoom_image (self.zoom_ratio) 101 self.zoom_image (self.zoom_ratio)
102 102
103 def on_expand(self, action): 103 def on_expand(self, action):
104 self.set_xscale (self.xscale * 1.5) 104 self.set_xscale (int(self.xscale * 1.5 + 0.5))
105 105
106 def on_contract(self, action): 106 def on_contract(self, action):
107 self.set_xscale (self.xscale / 1.5) 107 self.set_xscale (max(int(self.xscale / 1.5), 1))
108 108
109 def on_zoom_in(self, action): 109 def on_zoom_in(self, action):
110 self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT) 110 self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT)