Commit 4176323a authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed python3.10 compatibility issue

parent 3443e268
...@@ -1230,10 +1230,10 @@ class VideoWidget(VideoSurface, ui_class): ...@@ -1230,10 +1230,10 @@ class VideoWidget(VideoSurface, ui_class):
if ideal_geometry.bottom() > self.rect().bottom(): if ideal_geometry.bottom() > self.rect().bottom():
ideal_geometry.moveBottom(self.rect().bottom()) ideal_geometry.moveBottom(self.rect().bottom())
new_height = limit((new_size.height() + 117) / 6 * self.camera_preview.scale_factor, min=self.camera_preview.minimumHeight(), max=self.camera_preview.maximumHeight()) new_height = int(limit((new_size.height() + 117) / 6 * self.camera_preview.scale_factor, min=self.camera_preview.minimumHeight(), max=self.camera_preview.maximumHeight()))
preview_geometry = QRect(0, 0, self.width_for_height(new_height), new_height) preview_geometry = QRect(0, 0, self.width_for_height(new_height), new_height)
quadrant = QRectF(QPointF(0, 0), new_size / 3) quadrant = QRectF(QPointF(0, 0), int(new_size / 3))
if quadrant.translated(0, 0).contains(preview_center): # top left gravity if quadrant.translated(0, 0).contains(preview_center): # top left gravity
preview_geometry.moveTopLeft(ideal_geometry.topLeft()) preview_geometry.moveTopLeft(ideal_geometry.topLeft())
......
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