diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-05 01:34:06 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-05 01:34:06 +0100 |
commit | 01bf832717d4910183f7e55715065044361a4108 (patch) | |
tree | b7b7b49219e63b6b5993be5391ec78ecd356930f | |
parent | Cleaning websnaps code.. (diff) | |
download | rekonq-01bf832717d4910183f7e55715065044361a4108.tar.xz |
Bug about page viewportsize seems fixed here, creating a copy of the
page fro the tab preview.
Some days of testing needed..
-rw-r--r-- | src/tabbar.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 49ed230b..43432ec4 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -168,9 +168,12 @@ void TabBar::showTabPreview(int tab) m_previewPopup.data()->setFrameShape(QFrame::StyledPanel); m_previewPopup.data()->setFrameShadow(QFrame::Plain); m_previewPopup.data()->setFixedSize(w, h); + QLabel *l = new QLabel(); - view->page()->setViewportSize(currentView->page()->viewportSize()); - l->setPixmap(WebSnap::renderPreview(*(view->page()), w, h)); + QWebPage copyPage(view->page()); + copyPage.setViewportSize(currentView->page()->viewportSize()); + l->setPixmap(WebSnap::renderPreview(copyPage, w, h)); + m_previewPopup.data()->setView(l); m_previewPopup.data()->layout()->setAlignment(Qt::AlignTop); m_previewPopup.data()->layout()->setMargin(0); |