mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
8185d24e61
commit
dd0d88f9d7
4 changed files with 17 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue