Skip to content

Commit

Permalink
Merge pull request #4 from brunoabinader/fix-dpi
Browse files Browse the repository at this point in the history
Grab device pixel ratio information from QScreen
  • Loading branch information
tmpsantos committed Jun 4, 2015
2 parents 6fb8c19 + 8900b51 commit 5d1c4b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/qmapboxgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ void QMapboxGL::wheelEvent(QWheelEvent *ev)

void QMapboxGL::resizeGL(int w, int h)
{
#ifdef Q_OS_LINUX
// FIXME: Find out why sprites don't get rendered
// correctly if I use 1.0 here.
d_ptr->map.resize(w, h, 1.00001);
d_ptr->map.resize(w, h, devicePixelRatio() + .00001);
#else
d_ptr->map.resize(w, h, devicePixelRatio());
#endif
}

QMapboxGLPrivate::QMapboxGLPrivate(QMapboxGL *q)
Expand Down

0 comments on commit 5d1c4b0

Please sign in to comment.