pombreda / pybootchartgui

Automatically exported from code.google.com/p/pybootchartgui
GNU General Public License v3.0
0 stars 0 forks source link

Scrolling does not respect the current magnification level #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If the chart is magnified/zoomed in on, the scrollbars retain their
settings making it impossible to scroll all the way to the right/bottom.

Original issue reported on code.google.com by henningniss on 25 Jan 2009 at 8:34

GoogleCodeExporter commented 9 years ago
I have the same issue, on the Ubuntu Jaunty's current version as well as latest 
svn
revision 113.
I reported it at launchpad as well:
https://bugs.launchpad.net/ubuntu/+source/pybootchartgui/+bug/358364

Original comment by David.Ga...@gmail.com on 10 Apr 2009 at 8:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What about this patch?

Index: pybootchartgui/gui.py
===================================================================
--- pybootchartgui/gui.py   (revision 107)
+++ pybootchartgui/gui.py   (working copy)
@@ -64,6 +64,9 @@
    ZOOM_INCREMENT = 1.25

         def zoom_image(self, zoom_ratio):
+            self.chart_width = self.chart_width * (zoom_ratio/self.zoom_ratio)
+            self.chart_height = self.chart_height * 
(zoom_ratio/self.zoom_ratio)
+            self._set_scroll_adjustments(self.hadj, self.vadj)
             self.zoom_ratio = zoom_ratio
             self.queue_draw()

Original comment by anders.n...@gmail.com on 12 Apr 2009 at 9:55

GoogleCodeExporter commented 9 years ago
Scrollbars now reflect zoom levels.

I resolved this by ensuring that the adjustments (ie., the scrollbars) respect 
the
current zoom level. In three places one translates back and forth between 
coordinates
and the values of the adjustments.

Original comment by henningniss on 13 Apr 2009 at 6:17