Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a50a9bc + 180482a commit d161209Copy full SHA for d161209
1 file changed
lib/matplotlib/backends/backend_qt.py
@@ -239,6 +239,7 @@ def __init__(self, figure=None):
239
palette = QtGui.QPalette(QtGui.QColor("white"))
240
self.setPalette(palette)
241
242
+ @QtCore.Slot()
243
def _update_pixel_ratio(self):
244
if self._set_device_pixel_ratio(
245
self.devicePixelRatioF() or 1): # rarely, devicePixelRatioF=0
@@ -248,6 +249,7 @@ def _update_pixel_ratio(self):
248
249
event = QtGui.QResizeEvent(self.size(), self.size())
250
self.resizeEvent(event)
251
252
+ @QtCore.Slot(QtGui.QScreen)
253
def _update_screen(self, screen):
254
# Handler for changes to a window's attached screen.
255
self._update_pixel_ratio()
0 commit comments