From 9c041e720c312c9275cbff17669f97d7d8cd43c3 Mon Sep 17 00:00:00 2001 From: Thomas VINCENT Date: Thu, 1 Oct 2020 17:37:46 +0200 Subject: [PATCH] Fix size of OpenGL backend at init --- silx/gui/plot/backends/BackendOpenGL.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/silx/gui/plot/backends/BackendOpenGL.py b/silx/gui/plot/backends/BackendOpenGL.py index e772882255..a9a0f9375e 100755 --- a/silx/gui/plot/backends/BackendOpenGL.py +++ b/silx/gui/plot/backends/BackendOpenGL.py @@ -230,6 +230,9 @@ def __init__(self, plot, parent=None, f=qt.Qt.WindowFlags()): foregroundColor=(0., 0., 0., 1.), gridColor=(.7, .7, .7, 1.), marginRatios=(.15, .1, .1, .15)) + self._plotFrame.size = ( # Init size with size int + int(self.getDevicePixelRatio() * 640), + int(self.getDevicePixelRatio() * 480)) # Make postRedisplay asynchronous using Qt signal self._sigPostRedisplay.connect(