summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-03-05 01:34:06 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-03-05 01:34:06 +0100
commit01bf832717d4910183f7e55715065044361a4108 (patch)
treeb7b7b49219e63b6b5993be5391ec78ecd356930f /src/tabbar.cpp
parentCleaning websnaps code.. (diff)
downloadrekonq-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..
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp7
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);