mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
mobile/profile: fix scaling of profile for HDPI screens
For reasons I don't understand, the device pixel ratio was taken into account twice. And as a result the transformation applied to the profile made us show only the top left part of it - but enlarged (depending on the DPR). This code fixes that problem by simply forcing the transformation used by the painter to be the identity matrix. I worry that this could be wrong in some situations, but for now it seems to fix the problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
83d6143f97
commit
f8eb5140e2
2 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
- core: avoid crash with corrupted cloud storage
|
||||
- mobile: fix profile scaling issue on high DPR devices
|
||||
- mobile/Android: add logfiles as attachment to support emails
|
||||
- planner: make ESC (cancel plan) work when moving handles
|
||||
- dive list: make dive guide visible in dive list [#3382]
|
||||
|
|
|
@ -51,7 +51,10 @@ void QMLProfile::paint(QPainter *painter)
|
|||
timer.start();
|
||||
|
||||
// let's look at the intended size of the content and scale our scene accordingly
|
||||
// for some odd reason the painter transformation is set up to scale by the dpr - which results
|
||||
// in applying that dpr scaling twice. So we hard-code it here to be the identity matrix
|
||||
QRect painterRect = painter->viewport();
|
||||
painter->resetTransform();
|
||||
if (m_diveId < 0)
|
||||
return;
|
||||
struct dive *d = get_dive_by_uniq_id(m_diveId);
|
||||
|
|
Loading…
Reference in a new issue