From f8d66f3fe1123bd2d0448ec95ce48b8030f77896 Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Wed, 24 Jun 2015 18:16:59 +0200 Subject: [PATCH] Use zoom_perc instead of setZoomFactor to set zoom. When using setZoomFactor, the NeighborList's fuzzyval doesn't get updated, which means the next -/+ press would do something weird. --- qutebrowser/browser/webpage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/webpage.py b/qutebrowser/browser/webpage.py index 15659f56f..071e627d9 100644 --- a/qutebrowser/browser/webpage.py +++ b/qutebrowser/browser/webpage.py @@ -241,7 +241,7 @@ class BrowserPage(QWebPage): if cur_data is not None: frame = self.mainFrame() if 'zoom' in cur_data: - frame.setZoomFactor(cur_data['zoom']) + frame.page().view().zoom_perc(cur_data['zoom'] * 100) if ('scroll-pos' in cur_data and frame.scrollPosition() == QPoint(0, 0)): QTimer.singleShot(0, functools.partial( @@ -418,7 +418,7 @@ class BrowserPage(QWebPage): if data is None: return if 'zoom' in data: - frame.setZoomFactor(data['zoom']) + frame.page().view().zoom_perc(data['zoom'] * 100) if 'scroll-pos' in data and frame.scrollPosition() == QPoint(0, 0): frame.setScrollPosition(data['scroll-pos'])