summaryrefslogtreecommitdiff
path: root/src/webtab.cpp
diff options
context:
space:
mode:
authorDavid E. Narváez <david.narvaez@computer.org>2012-04-17 01:58:25 -0500
committerDavid E. Narváez <david.narvaez@computer.org>2012-04-17 01:58:25 -0500
commit14f5f78b2c59d40207ff0e988200ef0180bd1081 (patch)
tree86e8487062d1826ceb053614751668d1fbaabea8 /src/webtab.cpp
parentReally fix Upper case urls management (diff)
downloadrekonq-14f5f78b2c59d40207ff0e988200ef0180bd1081.tar.xz
Remove tabbar.h and mainwindow.h Dependencies from webtab.cpp
Fixes previous attempt to move tab preview to WebTab class. REVIEW: 104517
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r--src/webtab.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp
index c91c3a20..1519d833 100644
--- a/src/webtab.cpp
+++ b/src/webtab.cpp
@@ -36,14 +36,12 @@
#include "application.h"
#include "historymanager.h"
#include "messagebar.h"
-#include "mainwindow.h"
#include "opensearchmanager.h"
#include "previewselectorbar.h"
#include "rsswidget.h"
#include "searchenginebar.h"
#include "sessionmanager.h"
#include "syncmanager.h"
-#include "tabbar.h"
#include "urlbar.h"
#include "walletbar.h"
#include "webpage.h"
@@ -368,7 +366,7 @@ bool WebTab::hasAdBlockedElements()
}
-QPixmap WebTab::tabPreview()
+QPixmap WebTab::tabPreview(int width, int height)
{
if (isPageLoading())
{
@@ -376,12 +374,9 @@ QPixmap WebTab::tabPreview()
return QPixmap();
}
- int w = (parentWidget()->sizeHint().width() / TabBar::baseWidthDivisor);
- int h = w * rApp->mainWindow()->size().height() / rApp->mainWindow()->size().width();
-
if (!part())
{
- return WebSnap::renderPagePreview(*page(), w, h);
+ return WebSnap::renderPagePreview(*page(), width, height);
}
else
{
@@ -390,7 +385,7 @@ QPixmap WebTab::tabPreview()
partWidget->render(&partThumb);
- return partThumb.scaled(w, h, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ return partThumb.scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
}