summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
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);