diff --git a/pyqtgraph/opengl/GLViewWidget.py b/pyqtgraph/opengl/GLViewWidget.py index f931fd72..f65edec6 100644 --- a/pyqtgraph/opengl/GLViewWidget.py +++ b/pyqtgraph/opengl/GLViewWidget.py @@ -72,11 +72,11 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): self._updateScreen(window.screen()) def deviceWidth(self): - dpr = self.devicePixelRatio() + dpr = self.devicePixelRatioF() return int(self.width() * dpr) def deviceHeight(self): - dpr = self.devicePixelRatio() + dpr = self.devicePixelRatioF() return int(self.height() * dpr) def reset(self): @@ -149,9 +149,6 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): else: return vp - def devicePixelRatio(self): - return self.devicePixelRatioF() - def setProjection(self, region=None): m = self.projectionMatrix(region) glMatrixMode(GL_PROJECTION)