mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d0e513d437
commit
cacd502cd3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user