From 5283eeb71b34c175d5c63f0aa384496e9a66da34 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 17 Jul 2021 18:55:55 +0800 Subject: [PATCH] remove override of devicePixelRatio() --- pyqtgraph/opengl/GLViewWidget.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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)