summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tabbar.cpp5
-rw-r--r--src/tabpreviewpopup.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 2f0803f8..e3b44d53 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -195,10 +195,13 @@ void TabBar::showTabPreview()
if (indexedTab->isPageLoading())
return;
- int w = (mv->sizeHint().width() / baseWidthDivisor);
+ // Make sure the hovered webtab match the current size
+ // Only the active one is updated by window resize events
+ indexedTab->resize(currentTab->size());
m_previewPopup = new TabPreviewPopup(indexedTab , this);
+ int w = (mv->sizeHint().width() / baseWidthDivisor);
int tabBarWidth = mv->size().width();
int leftIndex = tabRect(m_currentTabPreviewIndex).x() + (tabRect(m_currentTabPreviewIndex).width() - w) / 2;
diff --git a/src/tabpreviewpopup.cpp b/src/tabpreviewpopup.cpp
index 63ff542d..0490e602 100644
--- a/src/tabpreviewpopup.cpp
+++ b/src/tabpreviewpopup.cpp
@@ -99,7 +99,7 @@ TabPreviewPopup::~TabPreviewPopup()
void TabPreviewPopup::setWebTab(WebTab* tab)
{
int w = (tab->parentWidget()->sizeHint().width() / TabBar::baseWidthDivisor);
- int h = w * rApp->mainWindow()->size().height() / rApp->mainWindow()->size().width();
+ int h = w * tab->size().height() / tab->size().width();
const QPixmap preview = tab->tabPreview(w, h);
if (!preview.isNull())