From d337def212acb6836ad93c2ec27625a19bfcdc61 Mon Sep 17 00:00:00 2001 From: Grace Karanja Date: Wed, 29 Jul 2015 15:30:51 +0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-mobile/qmlprofile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2