diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-23 19:56:41 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-24 19:58:24 +0300 |
commit | 835790d41a39663cb0ef17f0ff8a7285cbdc94fd (patch) | |
tree | 036334c324e3fcaacf9d68a336a231b9b0fab815 | |
parent | 1769e6fcb42d41e042c488bf2023fed360b87357 (diff) | |
download | qtlocation-mapboxgl-835790d41a39663cb0ef17f0ff8a7285cbdc94fd.tar.gz |
[Qt] Consider pixel ratio in View::getFramebufferSize()
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index 32e0f43c8d..e901f6fcd4 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -656,7 +656,12 @@ std::array<uint16_t, 2> QMapboxGLPrivate::getSize() const std::array<uint16_t, 2> QMapboxGLPrivate::getFramebufferSize() const { +#if QT_VERSION >= 0x050000 + return {{ static_cast<uint16_t>(size.width() * qApp->devicePixelRatio()), + static_cast<uint16_t>(size.height() * qApp->devicePixelRatio()) }}; +#else return getSize(); +#endif } void QMapboxGLPrivate::invalidate() |