Skip to content

Commit

Permalink
Standardize left menu and images alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Nov 26, 2021
1 parent e53ab53 commit 1999bf6
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 32 deletions.
36 changes: 21 additions & 15 deletions res/design.ui
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<property name="geometry">
<rect>
<x>25</x>
<y>139</y>
<y>145</y>
<width>7</width>
<height>16</height>
</rect>
Expand Down Expand Up @@ -128,7 +128,7 @@
<property name="geometry">
<rect>
<x>5</x>
<y>67</y>
<y>70</y>
<width>101</width>
<height>23</height>
</rect>
Expand Down Expand Up @@ -588,6 +588,9 @@
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="currentSplitImage">
<property name="geometry">
Expand All @@ -604,6 +607,9 @@
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="currentsplitimageLabel">
<property name="geometry">
Expand All @@ -622,7 +628,7 @@
<property name="geometry">
<rect>
<x>12</x>
<y>177</y>
<y>185</y>
<width>33</width>
<height>16</height>
</rect>
Expand All @@ -635,7 +641,7 @@
<property name="geometry">
<rect>
<x>66</x>
<y>177</y>
<y>185</y>
<width>41</width>
<height>16</height>
</rect>
Expand All @@ -661,7 +667,7 @@
<property name="geometry">
<rect>
<x>6</x>
<y>193</y>
<y>200</y>
<width>44</width>
<height>22</height>
</rect>
Expand All @@ -680,7 +686,7 @@
<property name="geometry">
<rect>
<x>62</x>
<y>193</y>
<y>200</y>
<width>44</width>
<height>22</height>
</rect>
Expand Down Expand Up @@ -712,7 +718,7 @@
<property name="geometry">
<rect>
<x>8</x>
<y>251</y>
<y>252</y>
<width>51</width>
<height>16</height>
</rect>
Expand All @@ -725,7 +731,7 @@
<property name="geometry">
<rect>
<x>62</x>
<y>248</y>
<y>250</y>
<width>44</width>
<height>22</height>
</rect>
Expand Down Expand Up @@ -768,9 +774,9 @@
<widget class="QPushButton" name="takescreenshotButton">
<property name="geometry">
<rect>
<x>250</x>
<x>260</x>
<y>250</y>
<width>92</width>
<width>101</width>
<height>24</height>
</rect>
</property>
Expand All @@ -785,7 +791,7 @@
<property name="geometry">
<rect>
<x>6</x>
<y>154</y>
<y>160</y>
<width>44</width>
<height>22</height>
</rect>
Expand Down Expand Up @@ -813,7 +819,7 @@
<property name="geometry">
<rect>
<x>62</x>
<y>154</y>
<y>160</y>
<width>44</width>
<height>22</height>
</rect>
Expand All @@ -838,7 +844,7 @@
<property name="geometry">
<rect>
<x>81</x>
<y>139</y>
<y>145</y>
<width>7</width>
<height>16</height>
</rect>
Expand Down Expand Up @@ -908,7 +914,7 @@
<property name="geometry">
<rect>
<x>5</x>
<y>92</y>
<y>95</y>
<width>101</width>
<height>23</height>
</rect>
Expand Down Expand Up @@ -940,7 +946,7 @@
<property name="geometry">
<rect>
<x>5</x>
<y>117</y>
<y>120</y>
<width>101</width>
<height>23</height>
</rect>
Expand Down
3 changes: 0 additions & 3 deletions src/AutoSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ def loadStartImage(self, started_by_button=False, wait_for_delay=True):
self.check_start_image_timestamp = time.time() + start_image_pause
self.startImageLabel.setText("Start image: paused")
self.currentSplitImage.setText('none (paused)')
self.currentSplitImage.setAlignment(QtCore.Qt.AlignCenter)
self.highestsimilarityLabel.setText(' ')
self.currentsimilaritythresholdnumberLabel.setText(' ')
else:
Expand Down Expand Up @@ -810,7 +809,6 @@ def autoSplitter(self):
self.undosplitButton.setEnabled(False)
self.skipsplitButton.setEnabled(False)
self.currentsplitimagefileLabel.setText(' ')
self.currentSplitImage.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)

# check for reset while delayed and display a counter of the remaining split delay time
delay_start_time = time.time()
Expand Down Expand Up @@ -857,7 +855,6 @@ def autoSplitter(self):
if self.number_of_split_images != self.split_image_number:
# set current split image to none
self.currentsplitimagefileLabel.setText(' ')
self.currentSplitImage.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.imageloopLabel.setText('Image Loop # -')

if not self.is_auto_controlled:
Expand Down
30 changes: 16 additions & 14 deletions src/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def setupUi(self, MainWindow):
self.browseButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.browseButton.setObjectName("browseButton")
self.xLabel = QtWidgets.QLabel(self.centralwidget)
self.xLabel.setGeometry(QtCore.QRect(25, 139, 7, 16))
self.xLabel.setGeometry(QtCore.QRect(25, 145, 7, 16))
self.xLabel.setObjectName("xLabel")
self.liveimageCheckBox = QtWidgets.QCheckBox(self.centralwidget)
self.liveimageCheckBox.setEnabled(True)
Expand All @@ -51,7 +51,7 @@ def setupUi(self, MainWindow):
self.liveimageCheckBox.setTristate(False)
self.liveimageCheckBox.setObjectName("liveimageCheckBox")
self.selectregionButton = QtWidgets.QPushButton(self.centralwidget)
self.selectregionButton.setGeometry(QtCore.QRect(5, 67, 101, 23))
self.selectregionButton.setGeometry(QtCore.QRect(5, 70, 101, 23))
self.selectregionButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.selectregionButton.setObjectName("selectregionButton")
self.similaritythresholdLabel = QtWidgets.QLabel(self.centralwidget)
Expand Down Expand Up @@ -174,33 +174,35 @@ def setupUi(self, MainWindow):
self.liveImage.setGeometry(QtCore.QRect(120, 70, 240, 180))
self.liveImage.setFrameShape(QtWidgets.QFrame.Shape.Box)
self.liveImage.setText("")
self.liveImage.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.liveImage.setObjectName("liveImage")
self.currentSplitImage = QtWidgets.QLabel(self.centralwidget)
self.currentSplitImage.setGeometry(QtCore.QRect(380, 70, 240, 180))
self.currentSplitImage.setFrameShape(QtWidgets.QFrame.Shape.Box)
self.currentSplitImage.setText("")
self.currentSplitImage.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.currentSplitImage.setObjectName("currentSplitImage")
self.currentsplitimageLabel = QtWidgets.QLabel(self.centralwidget)
self.currentsplitimageLabel.setGeometry(QtCore.QRect(450, 50, 102, 16))
self.currentsplitimageLabel.setObjectName("currentsplitimageLabel")
self.widthLabel = QtWidgets.QLabel(self.centralwidget)
self.widthLabel.setGeometry(QtCore.QRect(12, 177, 33, 16))
self.widthLabel.setGeometry(QtCore.QRect(12, 185, 33, 16))
self.widthLabel.setObjectName("widthLabel")
self.heightLabel = QtWidgets.QLabel(self.centralwidget)
self.heightLabel.setGeometry(QtCore.QRect(66, 177, 41, 16))
self.heightLabel.setGeometry(QtCore.QRect(66, 185, 41, 16))
self.heightLabel.setObjectName("heightLabel")
self.fpsvalueLabel = QtWidgets.QLabel(self.centralwidget)
self.fpsvalueLabel.setGeometry(QtCore.QRect(58, 225, 26, 20))
self.fpsvalueLabel.setText("")
self.fpsvalueLabel.setObjectName("fpsvalueLabel")
self.widthSpinBox = QtWidgets.QSpinBox(self.centralwidget)
self.widthSpinBox.setGeometry(QtCore.QRect(6, 193, 44, 22))
self.widthSpinBox.setGeometry(QtCore.QRect(6, 200, 44, 22))
self.widthSpinBox.setMinimum(1)
self.widthSpinBox.setMaximum(10000)
self.widthSpinBox.setProperty("value", 640)
self.widthSpinBox.setObjectName("widthSpinBox")
self.heightSpinBox = QtWidgets.QSpinBox(self.centralwidget)
self.heightSpinBox.setGeometry(QtCore.QRect(62, 193, 44, 22))
self.heightSpinBox.setGeometry(QtCore.QRect(62, 200, 44, 22))
self.heightSpinBox.setMinimum(1)
self.heightSpinBox.setMaximum(10000)
self.heightSpinBox.setProperty("value", 480)
Expand All @@ -209,10 +211,10 @@ def setupUi(self, MainWindow):
self.captureregionLabel.setGeometry(QtCore.QRect(200, 50, 82, 16))
self.captureregionLabel.setObjectName("captureregionLabel")
self.fpslimitLabel = QtWidgets.QLabel(self.centralwidget)
self.fpslimitLabel.setGeometry(QtCore.QRect(8, 251, 51, 16))
self.fpslimitLabel.setGeometry(QtCore.QRect(8, 252, 51, 16))
self.fpslimitLabel.setObjectName("fpslimitLabel")
self.fpslimitSpinBox = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.fpslimitSpinBox.setGeometry(QtCore.QRect(62, 248, 44, 22))
self.fpslimitSpinBox.setGeometry(QtCore.QRect(62, 250, 44, 22))
self.fpslimitSpinBox.setPrefix("")
self.fpslimitSpinBox.setDecimals(0)
self.fpslimitSpinBox.setMinimum(30.0)
Expand All @@ -226,11 +228,11 @@ def setupUi(self, MainWindow):
self.currentsplitimagefileLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.currentsplitimagefileLabel.setObjectName("currentsplitimagefileLabel")
self.takescreenshotButton = QtWidgets.QPushButton(self.centralwidget)
self.takescreenshotButton.setGeometry(QtCore.QRect(250, 250, 92, 24))
self.takescreenshotButton.setGeometry(QtCore.QRect(260, 250, 101, 24))
self.takescreenshotButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.takescreenshotButton.setObjectName("takescreenshotButton")
self.xSpinBox = QtWidgets.QSpinBox(self.centralwidget)
self.xSpinBox.setGeometry(QtCore.QRect(6, 154, 44, 22))
self.xSpinBox.setGeometry(QtCore.QRect(6, 160, 44, 22))
self.xSpinBox.setReadOnly(False)
self.xSpinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.ButtonSymbols.UpDownArrows)
self.xSpinBox.setMinimum(0)
Expand All @@ -239,15 +241,15 @@ def setupUi(self, MainWindow):
self.xSpinBox.setProperty("value", 0)
self.xSpinBox.setObjectName("xSpinBox")
self.ySpinBox = QtWidgets.QSpinBox(self.centralwidget)
self.ySpinBox.setGeometry(QtCore.QRect(62, 154, 44, 22))
self.ySpinBox.setGeometry(QtCore.QRect(62, 160, 44, 22))
self.ySpinBox.setReadOnly(False)
self.ySpinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.ButtonSymbols.UpDownArrows)
self.ySpinBox.setMinimum(0)
self.ySpinBox.setMaximum(999999999)
self.ySpinBox.setProperty("value", 0)
self.ySpinBox.setObjectName("ySpinBox")
self.yLabel = QtWidgets.QLabel(self.centralwidget)
self.yLabel.setGeometry(QtCore.QRect(81, 139, 7, 16))
self.yLabel.setGeometry(QtCore.QRect(81, 145, 7, 16))
self.yLabel.setObjectName("yLabel")
self.comparisonmethodComboBox = QtWidgets.QComboBox(self.centralwidget)
self.comparisonmethodComboBox.setGeometry(QtCore.QRect(125, 296, 91, 22))
Expand All @@ -265,15 +267,15 @@ def setupUi(self, MainWindow):
self.comparisonmethodLabel.setGeometry(QtCore.QRect(7, 298, 110, 16))
self.comparisonmethodLabel.setObjectName("comparisonmethodLabel")
self.alignregionButton = QtWidgets.QPushButton(self.centralwidget)
self.alignregionButton.setGeometry(QtCore.QRect(5, 92, 101, 23))
self.alignregionButton.setGeometry(QtCore.QRect(5, 95, 101, 23))
self.alignregionButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.alignregionButton.setObjectName("alignregionButton")
self.groupDummySplitsCheckBox = QtWidgets.QCheckBox(self.centralwidget)
self.groupDummySplitsCheckBox.setGeometry(QtCore.QRect(230, 442, 261, 20))
self.groupDummySplitsCheckBox.setChecked(False)
self.groupDummySplitsCheckBox.setObjectName("groupDummySplitsCheckBox")
self.selectwindowButton = QtWidgets.QPushButton(self.centralwidget)
self.selectwindowButton.setGeometry(QtCore.QRect(5, 117, 101, 23))
self.selectwindowButton.setGeometry(QtCore.QRect(5, 120, 101, 23))
self.selectwindowButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.selectwindowButton.setObjectName("selectwindowButton")
self.imageloopLabel = QtWidgets.QLabel(self.centralwidget)
Expand Down

0 comments on commit 1999bf6

Please sign in to comment.