From: Peter Kjellerstedt Date: Fri, 15 Nov 2013 17:08:51 +0000 (+0100) Subject: pybootchartgui: Make the horizontal scaling stay within bounds X-Git-Tag: 2015-4~4598 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=50c2c3435915ef1ecbde395c71c5c9581c83fb2e;p=openembedded-core.git pybootchartgui: Make the horizontal scaling stay within bounds Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- 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): self.zoom_image (self.zoom_ratio) def on_expand(self, action): - self.set_xscale (self.xscale * 1.5) + self.set_xscale (int(self.xscale * 1.5 + 0.5)) def on_contract(self, action): - self.set_xscale (self.xscale / 1.5) + self.set_xscale (max(int(self.xscale / 1.5), 1)) def on_zoom_in(self, action): self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT)