aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlprofile.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-28 16:43:40 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-28 17:05:29 -0500
commitdd0d88f9d74975bf9ee84dcf2e18948d2680356d (patch)
tree7718e4d277aa792ba415c1496415858ad51cea4f /qt-mobile/qmlprofile.cpp
parent8185d24e610e5655da8ccbcfcc4411ea2215fc1f (diff)
downloadsubsurface-dd0d88f9d74975bf9ee84dcf2e18948d2680356d.tar.gz
QML UI: take device pixel ratio into account when scaling pixmaps on iOS
This way warning icons and tank change icons and other event markers are no longer ridiculously tiny on retina screens. Oddly this doesn't appear to be needed on Android, only on iOS. Fixes #1033 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, 2 insertions, 0 deletions
diff --git a/qt-mobile/qmlprofile.cpp b/qt-mobile/qmlprofile.cpp
index 249a6b818..ad686561d 100644
--- a/qt-mobile/qmlprofile.cpp
+++ b/qt-mobile/qmlprofile.cpp
@@ -2,6 +2,7 @@
#include "qmlmanager.h"
#include "profile-widget/profilewidget2.h"
#include "subsurface-core/dive.h"
+#include "subsurface-core/metrics.h"
#include <QTransform>
#include <QScreen>
@@ -99,6 +100,7 @@ void QMLProfile::setDevicePixelRatio(qreal dpr)
if (dpr != m_devicePixelRatio) {
m_devicePixelRatio = dpr;
m_profileWidget->setFontPrintScale(0.8 * dpr);
+ updateDevicePixelRatio(dpr);
emit devicePixelRatioChanged();
}
}