File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -115,17 +115,16 @@ def mouseMoveEvent(self, event):
115115 def resize (self , width , height ):
116116 """
117117 Pyqt specific resize callback.
118- The window currently do not support resizing.
119118 """
120119 if not self .fbo :
121120 return
122121
123- self .width = width
124- self .height = height
125- self .buffer_width = self .width * self .widget .devicePixelRatio ()
126- self .buffer_height = self .height * self .widget .devicePixelRatio ()
122+ # pyqt reports sizes in actual buffer size
123+ self .width = width // self .widget .devicePixelRatio ()
124+ self .height = height // self .widget .devicePixelRatio ()
125+ self .buffer_width = width
126+ self .buffer_height = height
127127
128- print (width , height )
129128 super ().resize (width , height )
130129
131130 def swap_buffers (self ):
You can’t perform that action at this time.
0 commit comments