From 5f10ca0b9a9872b6dafc687976de28d6128c0aff Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 17 Sep 2009 03:25:18 +0200 Subject: Fixing previews dimension.. --- src/webpluginfactory.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.1