File tree 1 file changed +5
-6
lines changed
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):
115
115
def resize (self , width , height ):
116
116
"""
117
117
Pyqt specific resize callback.
118
- The window currently do not support resizing.
119
118
"""
120
119
if not self .fbo :
121
120
return
122
121
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
127
127
128
- print (width , height )
129
128
super ().resize (width , height )
130
129
131
130
def swap_buffers (self ):
You can’t perform that action at this time.
0 commit comments