diff options
author | Michael Dominic K <mdk@codethink.co.uk> | 2010-10-18 14:50:06 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-10-18 14:50:06 (GMT) |
commit | 4030cfb5b6788f115054aa8753248e6f7aa7ab37 (patch) | |
tree | 7d1c7786996f8f061e681ae11773ee6c18f347ca /tools/qmeegographicssystemhelper | |
parent | e977b40e0e7d2540d4f2f42f25b678cd74822c77 (diff) | |
download | Qt-4030cfb5b6788f115054aa8753248e6f7aa7ab37.zip Qt-4030cfb5b6788f115054aa8753248e6f7aa7ab37.tar.gz Qt-4030cfb5b6788f115054aa8753248e6f7aa7ab37.tar.bz2 |
Use the real screen size in meegographics surface scaling, not hardcoded one.
Merge-request: 864
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tools/qmeegographicssystemhelper')
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp index f9f14ae..b42a7ea 100644 --- a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp +++ b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp @@ -42,7 +42,8 @@ #include <QDebug> #include <QEvent> #include <QMouseEvent> -#include <QCoreApplication> +#include <QApplication> +#include <QDesktopWidget> #include "qmeegooverlaywidget.h" #include "qmeegographicssystemhelper.h" #include "qmeegoruntime.h" @@ -54,10 +55,12 @@ QMeeGoOverlayWidget::QMeeGoOverlayWidget(int surfaceWidth, int surfaceHeight, QW if (! QMeeGoGraphicsSystemHelper::isRunningMeeGo()) qFatal("QMeeGoOverlayWidget can only be used when running with 'meego' graphics system!"); + const QRect desktop = QApplication::desktop()->screenGeometry(parent); + QMeeGoRuntime::setSurfaceFixedSize(surfaceWidth, surfaceHeight); - scaleW = sw / 864.0; - scaleH = sh / 480.0; + scaleW = sw / desktop.width(); + scaleH = sh / desktop.height(); installEventFilter(this); } |