diff --git a/src/damaris/gui/DamarisGUI.py b/src/damaris/gui/DamarisGUI.py index ed117dd..3f851c5 100644 --- a/src/damaris/gui/DamarisGUI.py +++ b/src/damaris/gui/DamarisGUI.py @@ -3024,6 +3024,18 @@ class BlitSafeCanvas( FigureCanvas ): screen. Painting the region right away keeps every regular paint a complete one and stays a partial update. """ + def _update_device_pixel_ratio( self, *args, **kwargs ): + """Render at logical resolution, ignoring the HiDPI scale factor. + + The stock canvas renders one buffer pixel per physical pixel, + four times the pixel count on a scaled screen, which makes the + interactive plot sluggish. Capping the ratio at 1 renders a + quarter of the pixels; the window system scales the output up. + """ + if self._set_device_pixel_ratio( 1 ): + self.queue_resize( ) + self.queue_draw( ) + def blit( self, bbox=None ): if bbox is None: bbox = self.figure.bbox