diff --git a/vmg/image_widget_gl.py b/vmg/image_widget_gl.py index b1daa9a..f9d9f9e 100644 --- a/vmg/image_widget_gl.py +++ b/vmg/image_widget_gl.py @@ -109,6 +109,8 @@ def wheelEvent(self, event: QtGui.QWheelEvent): self.update() def paintGL(self) -> None: + bg_color = self.palette().color(self.backgroundRole()).getRgbF() + GL.glClearColor(*bg_color) GL.glClear(GL.GL_COLOR_BUFFER_BIT) if self.image is None: return