aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlprofile.cpp
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-07-29 15:30:51 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-29 15:21:06 -0700
commitd337def212acb6836ad93c2ec27625a19bfcdc61 (patch)
treed9fdbe152cc3e55782fd647d290b388c6dc1ef39 /qt-mobile/qmlprofile.cpp
parenta27623dad06aa810a07cdea227b0f40d336cec9d (diff)
downloadsubsurface-d337def212acb6836ad93c2ec27625a19bfcdc61.tar.gz
QML UI: Fix incorrect sizing of dive profile
This resizes the dive profile to always maintain an equal width and height, so that the sizing is the same in all devices. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlprofile.cpp')
-rw-r--r--qt-mobile/qmlprofile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-mobile/qmlprofile.cpp b/qt-mobile/qmlprofile.cpp
index 9e30cc018..19a7d86fa 100644
--- a/qt-mobile/qmlprofile.cpp
+++ b/qt-mobile/qmlprofile.cpp
@@ -27,7 +27,7 @@ void QMLProfile::paint(QPainter *painter)
prefs.animation_speed = 0; // no animations while rendering the QGraphicsView
profile->plotDive(d);
QTransform profileTransform;
- profileTransform.scale((this->width() / profile->sceneRect().width()) - 1, (this->height()/profile->sceneRect().height()) - 1);
+ profileTransform.scale(this->height() / 100, this->height() / 100);
profile->setTransform(profileTransform);
profile->render(painter);
prefs.animation_speed = old_animation_speed;