summaryrefslogtreecommitdiffstats
path: root/subsurface-core/metrics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-core/metrics.cpp')
-rw-r--r--subsurface-core/metrics.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/subsurface-core/metrics.cpp b/subsurface-core/metrics.cpp
index db636794d..3c66528b8 100644
--- a/subsurface-core/metrics.cpp
+++ b/subsurface-core/metrics.cpp
@@ -15,7 +15,8 @@ IconMetrics::IconMetrics() :
sz_med(-1),
sz_big(-1),
sz_pic(-1),
- spacing(-1)
+ spacing(-1),
+ dpr(1.0)
{
}
@@ -57,3 +58,8 @@ const IconMetrics & defaultIconMetrics()
return dfltIconMetrics;
}
+
+void updateDevicePixelRatio(double dpr)
+{
+ dfltIconMetrics.dpr = dpr;
+}