Skip to content

Commit

Permalink
preview: use toAlignedRect (always rounds up)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Jan 3, 2022
1 parent a9c1f10 commit 1433b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/windows/video_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ def centeredViewport(self, width, height):
) * self.zoom
viewport_rect = QRectF(QPointF(0, 0), viewport_size)
viewport_rect.moveCenter(window_rect.center())

return viewport_rect.toRect()
# Always round up to next whole integer value
return viewport_rect.toAlignedRect()

def present(self, image, *args):
""" Present the current frame """
Expand Down

0 comments on commit 1433b21

Please sign in to comment.