diff options
author | lionelc <lionelc@lionelc.(none)> | 2009-10-22 14:39:32 +0200 |
---|---|---|
committer | lionelc <lionelc@lionelc.(none)> | 2009-10-22 14:39:32 +0200 |
commit | 67046876c693cdd9bf5222637eb29b777500c0b2 (patch) | |
tree | 0a71b08cc3ea87f6904c9d0c7f5753638f2a2ab9 | |
parent | rekonq 0.2.70 (diff) | |
download | rekonq-67046876c693cdd9bf5222637eb29b777500c0b2.tar.xz |
fix tab preview size
-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 bde1e63e..73788094 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 c9160e5a..cdbb7b11 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -436,7 +436,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); |