diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-29 12:41:39 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-29 12:41:39 +0200 |
commit | 1ef712920d762f9f88393caf1018bd8708c02424 (patch) | |
tree | 56107fd4b2f222b91d321c09dc20a65a8d3f4487 /src/websnap.cpp | |
parent | Right icon button fix (diff) | |
download | rekonq-1ef712920d762f9f88393caf1018bd8708c02424.tar.xz |
Fixing tab switch behavior.
It seems webkit removed an update on setViewPortSize, letting
our trick about setScrollBarPolicy dangerous (no scrollbar on rendered
pages)
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r-- | src/websnap.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp index 6be7314e..af52b592 100644 --- a/src/websnap.cpp +++ b/src/websnap.cpp @@ -72,10 +72,14 @@ void WebSnap::load() // You are playing with fire.. QPixmap WebSnap::renderPreview(const QWebPage &page, int w, int h) { + // NOTE + // it seems no way to enable/disable scrollbars in new QtWebKit's + // and this is affecting tabbed browsing + // prepare page - page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); - page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); QSize oldSize = page.viewportSize(); +// page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); +// page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); // find the best size QSize size; @@ -98,8 +102,8 @@ QPixmap WebSnap::renderPreview(const QWebPage &page, int w, int h) pageImage = pageImage.scaled(w, h, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); // restore page settings - page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded); - page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded); +// page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded); +// page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded); page.setViewportSize(oldSize); QPixmap pm = QPixmap::fromImage(pageImage); |