From fc24c3cc4cf7c378d2cd6860b8dffd8cf29901c7 Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Fri, 29 Jun 2018 01:15:34 +0200 Subject: [PATCH] Padding in review screen fixed --- photobooth/gui/Qt5Gui/Frames.py | 6 +++--- photobooth/gui/Qt5Gui/stylesheets/pastel.qss | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/photobooth/gui/Qt5Gui/Frames.py b/photobooth/gui/Qt5Gui/Frames.py index c766353..2306e02 100644 --- a/photobooth/gui/Qt5Gui/Frames.py +++ b/photobooth/gui/Qt5Gui/Frames.py @@ -170,11 +170,11 @@ class PictureMessage(QtWidgets.QFrame): pix = QtGui.QPixmap.fromImage(self._picture) else: pix = QtGui.QPixmap(self._picture) - pix = pix.scaled(self.rect().size(), QtCore.Qt.KeepAspectRatio, + pix = pix.scaled(self.contentsRect().size(), QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) - origin = ((self.rect().width() - pix.width()) // 2, - (self.rect().height() - pix.height()) // 2) + origin = ((self.width() - pix.width()) // 2, + (self.height() - pix.height()) // 2) painter.drawPixmap(QtCore.QPoint(*origin), pix) def paintEvent(self, event): diff --git a/photobooth/gui/Qt5Gui/stylesheets/pastel.qss b/photobooth/gui/Qt5Gui/stylesheets/pastel.qss index 19635cd..ea4ff12 100644 --- a/photobooth/gui/Qt5Gui/stylesheets/pastel.qss +++ b/photobooth/gui/Qt5Gui/stylesheets/pastel.qss @@ -112,7 +112,7 @@ QFrame#WaitMessage QLabel { /* Picture Screen*/ QFrame#PictureMessage { - margin: 40px; + margin: 30px; } /* Customizing settings */