diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-17 03:25:18 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-17 03:25:18 +0200 |
commit | 5f10ca0b9a9872b6dafc687976de28d6128c0aff (patch) | |
tree | c079fe53154df5f5fce05bf5f0a9c0785f110b00 | |
parent | Here we are, embedding Qt Widgets.. (diff) | |
download | rekonq-5f10ca0b9a9872b6dafc687976de28d6128c0aff.tar.xz |
Fixing previews dimension..
-rw-r--r-- | src/webpluginfactory.cpp | 10 |
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; } |