summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-29 12:41:39 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-29 12:41:39 +0200
commit1ef712920d762f9f88393caf1018bd8708c02424 (patch)
tree56107fd4b2f222b91d321c09dc20a65a8d3f4487 /src/websnap.cpp
parentRight icon button fix (diff)
downloadrekonq-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.cpp12
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);