Changed layout of settings screen to make it fit back on 1024x600 screens

This commit is contained in:
Balthasar Reuter
2018-07-23 23:08:20 +02:00
parent f9eed40b71
commit 32bcd776c4
4 changed files with 35 additions and 7 deletions

View File

@@ -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()

View File

@@ -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):

View File

@@ -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;
}

View File

@@ -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;