From dd0d88f9d74975bf9ee84dcf2e18948d2680356d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 28 Mar 2016 16:43:40 -0500 Subject: 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 --- profile-widget/diveeventitem.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'profile-widget') diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index b2e3db8c9..3e1de48f3 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -65,8 +65,13 @@ void DiveEventItem::setupPixmap() const IconMetrics& metrics = defaultIconMetrics(); #ifndef SUBSURFACE_MOBILE int sz_bigger = metrics.sz_med + metrics.sz_small; // ex 40px +#else +#if defined(Q_OS_IOS) + // on iOS devices we need to adjust for Device Pixel Ratio + int sz_bigger = metrics.sz_med * metrics.dpr; #else int sz_bigger = metrics.sz_med; +#endif #endif int sz_pix = sz_bigger/2; // ex 20px -- cgit v1.2.3-70-g09d2