Commit b76eee55 authored by David Gobbi's avatar David Gobbi
Browse files

For Python Qt widget, set DPI for text scaling

Without this change, text is half-size on HiDPI displays.
parent f2c2f20d
...@@ -384,6 +384,7 @@ class QVTKRenderWindowInteractor(QVTKRWIBaseClass): ...@@ -384,6 +384,7 @@ class QVTKRenderWindowInteractor(QVTKRWIBaseClass):
scale = self._getPixelRatio() scale = self._getPixelRatio()
w = int(round(scale*self.width())) w = int(round(scale*self.width()))
h = int(round(scale*self.height())) h = int(round(scale*self.height()))
self._RenderWindow.SetDPI(int(round(72*scale)))
vtkRenderWindow.SetSize(self._RenderWindow, w, h) vtkRenderWindow.SetSize(self._RenderWindow, w, h)
self._Iren.SetSize(w, h) self._Iren.SetSize(w, h)
self._Iren.ConfigureEvent() self._Iren.ConfigureEvent()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment