summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-17 03:25:18 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-17 03:25:18 +0200
commit5f10ca0b9a9872b6dafc687976de28d6128c0aff (patch)
treec079fe53154df5f5fce05bf5f0a9c0785f110b00 /src
parentHere we are, embedding Qt Widgets.. (diff)
downloadrekonq-5f10ca0b9a9872b6dafc687976de28d6128c0aff.tar.xz
Fixing previews dimension..
Diffstat (limited to 'src')
-rw-r--r--src/webpluginfactory.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/webpluginfactory.cpp b/src/webpluginfactory.cpp
index 1ff1b783..b836e620 100644
--- a/src/webpluginfactory.cpp
+++ b/src/webpluginfactory.cpp
@@ -58,7 +58,15 @@ QObject *WebPluginFactory::create(const QString &mimeType,
WebView* w = new WebView( Application::instance()->mainWindow()->currentTab() );
w->load(url);
-// w->page()->setViewportSize(w->page()->mainFrame()->contentsSize());
+ QWebFrame *frame = w->page()->mainFrame();
+
+ QSize size = frame->contentsSize();
+ qreal zoom = size.height()/150.;
+ frame->setZoomFactor(zoom);
+
+ frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+ frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+
return w;
}