summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-18 17:51:38 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-18 17:51:38 +0200
commit7e219561a2d4cacdec270d451d01c02b5dcba7ee (patch)
treec283e95946599fd2c8630257b476135fdad65a8e /src/websnap.cpp
parentNo more save tab previews as they are everytime computed again.. (diff)
downloadrekonq-7e219561a2d4cacdec270d451d01c02b5dcba7ee.tar.xz
no more scrollbar on rendered previews
Lionel fixed this :)
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r--src/websnap.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp
index b85e5da8..03bdb544 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -83,14 +83,8 @@ void WebSnap::load()
// You are playing with fire..
QPixmap WebSnap::renderPreview(const QWebPage &page, int w, int h, bool save)
{
- // NOTE
- // it seems no way to enable/disable scrollbars in new QtWebKit's
- // and this is affecting tabbed browsing
-
// prepare page
QSize oldSize = page.viewportSize();
-// page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
-// page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
// find the best size
QSize size;
@@ -108,13 +102,11 @@ QPixmap WebSnap::renderPreview(const QWebPage &page, int w, int h, bool save)
// render it
QPainter p(&pageImage);
- page.mainFrame()->render(&p);
+ page.mainFrame()->render(&p, QWebFrame::ContentsLayer);
p.end();
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.setViewportSize(oldSize);
QPixmap pm = QPixmap::fromImage(pageImage);