mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +00:00
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>
This commit is contained in:
parent
a27623dad0
commit
d337def212
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ void QMLProfile::paint(QPainter *painter)
|
||||||
prefs.animation_speed = 0; // no animations while rendering the QGraphicsView
|
prefs.animation_speed = 0; // no animations while rendering the QGraphicsView
|
||||||
profile->plotDive(d);
|
profile->plotDive(d);
|
||||||
QTransform profileTransform;
|
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->setTransform(profileTransform);
|
||||||
profile->render(painter);
|
profile->render(painter);
|
||||||
prefs.animation_speed = old_animation_speed;
|
prefs.animation_speed = old_animation_speed;
|
||||||
|
|
Loading…
Reference in a new issue