diff --git a/photobooth/gui/Qt5Gui/Frames.py b/photobooth/gui/Qt5Gui/Frames.py index c421e6f..3d995bd 100644 --- a/photobooth/gui/Qt5Gui/Frames.py +++ b/photobooth/gui/Qt5Gui/Frames.py @@ -138,14 +138,15 @@ class GreeterMessage(QtWidgets.QFrame): class CaptureMessage(QtWidgets.QFrame): - def __init__(self, num_picture, num_x, num_y): + def __init__(self, num_picture, num_x, num_y, skip_last): super().__init__() self.setObjectName('PoseMessage') - if num_x * num_y > 1: + num_pictures = max(num_x * num_y - int(skip_last), 1) + if num_pictures > 1: self._text = 'Picture {} of {}...'.format(num_picture, - num_x * num_y) + num_pictures) else: self._text = 'Taking a photo...' @@ -462,7 +463,6 @@ class Settings(QtWidgets.QFrame): layout = QtWidgets.QVBoxLayout() layout.addWidget(self.createTabs()) - # layout.addStretch(1) layout.addWidget(self.createButtons()) self.setLayout(layout) @@ -704,14 +704,19 @@ class Settings(QtWidgets.QFrame): lay_file.addWidget(bg) lay_file.addWidget(file_button) + lay_checkbox = QtWidgets.QHBoxLayout() + lay_checkbox.addWidget(keep_pictures) + lay_checkbox.addStretch(1) + lay_checkbox.addWidget(QtWidgets.QLabel('Omit last picture:')) + lay_checkbox.addWidget(skip_last) + layout = QtWidgets.QFormLayout() layout.addRow('Number of shots per picture:', lay_num) layout.addRow('Size of assembled picture [px]:', lay_size) layout.addRow('Min. distance between shots [px]:', lay_dist) layout.addRow('Output directory (strftime possible):', lay_dir) layout.addRow('Basename of files (strftime possible):', basename) - layout.addRow('Keep single shots:', keep_pictures) - layout.addRow('Omit last picture:', skip_last) + layout.addRow('Keep single shots:', lay_checkbox) layout.addRow('Background image:', lay_file) widget = QtWidgets.QWidget() diff --git a/photobooth/gui/Qt5Gui/PyQt5Gui.py b/photobooth/gui/Qt5Gui/PyQt5Gui.py index 5dd3bfd..d762258 100644 --- a/photobooth/gui/Qt5Gui/PyQt5Gui.py +++ b/photobooth/gui/Qt5Gui/PyQt5Gui.py @@ -205,7 +205,9 @@ class PyQt5Gui(GuiSkeleton): num_pic = (self._cfg.getInt('Picture', 'num_x'), self._cfg.getInt('Picture', 'num_y')) - self._setWidget(Frames.CaptureMessage(state.num_picture, *num_pic)) + skip_last = self._cfg.getBool('Picture', 'skip_last') + self._setWidget(Frames.CaptureMessage(state.num_picture, *num_pic, + skip_last)) def showAssemble(self, state): diff --git a/photobooth/gui/Qt5Gui/stylesheets/dark.qss b/photobooth/gui/Qt5Gui/stylesheets/dark.qss index 80201e7..eb24b3a 100644 --- a/photobooth/gui/Qt5Gui/stylesheets/dark.qss +++ b/photobooth/gui/Qt5Gui/stylesheets/dark.qss @@ -190,6 +190,16 @@ QTabBar::tab:selected { background-color: #33ffffff; } +QGroupBox { + background-color: transparent; + border-style: outset; + border-width: 1px; + border-radius: 15px; + border-color: #eeeeee; + margin: 0px; + padding: 4px; +} + QTabWidget QWidget { color: #333333; } diff --git a/photobooth/gui/Qt5Gui/stylesheets/pastel.qss b/photobooth/gui/Qt5Gui/stylesheets/pastel.qss index 35d5810..956e9c3 100644 --- a/photobooth/gui/Qt5Gui/stylesheets/pastel.qss +++ b/photobooth/gui/Qt5Gui/stylesheets/pastel.qss @@ -169,6 +169,7 @@ QTabWidget::pane { border-color: #eeeeee; color: #333333; padding: 10px; + margin: 0; } QTabWidget::tab-bar { @@ -189,6 +190,16 @@ QTabBar::tab:selected { background-color: #66ffffff; } +QGroupBox { + background-color: transparent; + border-style: outset; + border-width: 1px; + border-radius: 15px; + border-color: #eeeeee; + margin: 0px; + padding: 4px; +} + QTabWidget QWidget { color: #333333; font-size: 30px;