diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-27 11:03:52 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-27 11:03:52 +0100 |
commit | aec2112d569dab1710618717390e1972319928e3 (patch) | |
tree | 117f4dcbc6b1c4b98d341bf73cb2e64fa418e2b1 /src | |
parent | Merge commit 'refs/merge-requests/1925' of git://gitorious.org/rekonq/mainlin... (diff) | |
parent | fix tab preview size (diff) | |
download | rekonq-aec2112d569dab1710618717390e1972319928e3.tar.xz |
Merge commit 'refs/merge-requests/1882' of git://gitorious.org/rekonq/mainline into mr1882
Diffstat (limited to 'src')
-rw-r--r-- | src/tabbar.cpp | 8 | ||||
-rw-r--r-- | src/webview.cpp | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp index b43bf4d0..40c8dc1c 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -190,21 +190,23 @@ void TabBar::reloadTab() void TabBar::showTabPreview(int tab) { WebView *view = m_parent->webView(tab); - + WebView *currentView = m_parent->webView(currentIndex()); + int w = tabSizeHint(tab).width(); - int h = w*((0.0 + view->height())/view->width()); + int h = w*((0.0 + currentView->height())/currentView->width()); //delete previous tab preview if (m_previewPopup) { delete m_previewPopup; } - + m_previewPopup = new KPassivePopup(this); m_previewPopup->setFrameShape(QFrame::StyledPanel); m_previewPopup->setFrameShadow(QFrame::Plain); m_previewPopup->setFixedSize(w, h); QLabel *l = new QLabel(); + view->page()->setViewportSize(currentView->page()->viewportSize()); l->setPixmap(WebSnap::renderPreview(*(view->page()), w, h)); m_previewPopup->setView(l); m_previewPopup->layout()->setAlignment(Qt::AlignTop); diff --git a/src/webview.cpp b/src/webview.cpp index 3bef7c1f..60bb496b 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -353,7 +353,7 @@ void WebView::mousePressEvent(QMouseEvent *event) m_page->m_pressedButtons = event->buttons(); m_page->m_keyboardModifiers = event->modifiers(); - switch(event->button()) + switch(event->button()) { case Qt::XButton1: triggerPageAction(QWebPage::Back); |