Skip to content

Commit

Permalink
image loop label: make up to 999 loops viewable in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Toufool committed Nov 24, 2021
1 parent a484d3c commit b1f1b32
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions res/design.ui
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@
<widget class="QPushButton" name="undosplitButton">
<property name="geometry">
<rect>
<x>480</x>
<x>494</x>
<y>250</y>
<width>71</width>
<width>64</width>
<height>24</height>
</rect>
</property>
Expand Down Expand Up @@ -955,14 +955,14 @@
<widget class="QLabel" name="imageloopLabel">
<property name="geometry">
<rect>
<x>380</x>
<x>379</x>
<y>252</y>
<width>108</width>
<width>113</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Image Loop #:</string>
<string>Image Loop:</string>
</property>
</widget>
<widget class="QLabel" name="pausehotkeyLabel">
Expand Down
8 changes: 4 additions & 4 deletions src/AutoSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ def autoSplitter(self):
# set current split image to none
self.currentsplitimagefileLabel.setText(' ')
self.currentSplitImage.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.imageloopLabel.setText('Image Loop # -')
self.imageloopLabel.setText('Image Loop: -')

if not self.is_auto_controlled:
# if its the last split image and last loop number, disable the skip split button
Expand Down Expand Up @@ -930,7 +930,7 @@ def guiChangesOnStart(self):

def guiChangesOnReset(self):
self.startautosplitterButton.setText('Start Auto Splitter')
self.imageloopLabel.setText("Image Loop # -")
self.imageloopLabel.setText('Image Loop: -')
self.currentSplitImage.setText(' ')
self.currentsplitimagefileLabel.setText(' ')
self.livesimilarityLabel.setText(' ')
Expand Down Expand Up @@ -1119,9 +1119,9 @@ def updateSplitImage(self, custom_image_file: str = '', from_load_start_image: b
# Set Image Loop #
if not from_load_start_image:
loop_tuple = self.split_image_filenames_and_loop_number[self.split_image_number]
self.imageloopLabel.setText(f"Image Loop # {loop_tuple[1]}/{loop_tuple[2]}")
self.imageloopLabel.setText(f"Image Loop: {loop_tuple[1]}/{loop_tuple[2]}")
else:
self.imageloopLabel.setText("Image Loop # 1/1")
self.imageloopLabel.setText("Image Loop: 1/1")

# need to set split below threshold to false each time an image updates.
self.split_below_threshold = False
Expand Down
6 changes: 3 additions & 3 deletions src/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def setupUi(self, MainWindow):
self.resetButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.resetButton.setObjectName("resetButton")
self.undosplitButton = QtWidgets.QPushButton(self.centralwidget)
self.undosplitButton.setGeometry(QtCore.QRect(480, 250, 71, 24))
self.undosplitButton.setGeometry(QtCore.QRect(494, 250, 64, 24))
self.undosplitButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.undosplitButton.setObjectName("undosplitButton")
self.skipsplitButton = QtWidgets.QPushButton(self.centralwidget)
Expand Down Expand Up @@ -277,7 +277,7 @@ def setupUi(self, MainWindow):
self.selectwindowButton.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.selectwindowButton.setObjectName("selectwindowButton")
self.imageloopLabel = QtWidgets.QLabel(self.centralwidget)
self.imageloopLabel.setGeometry(QtCore.QRect(380, 252, 108, 20))
self.imageloopLabel.setGeometry(QtCore.QRect(379, 252, 113, 20))
self.imageloopLabel.setObjectName("imageloopLabel")
self.pausehotkeyLabel = QtWidgets.QLabel(self.centralwidget)
self.pausehotkeyLabel.setGeometry(QtCore.QRect(230, 418, 31, 16))
Expand Down Expand Up @@ -480,7 +480,7 @@ def retranslateUi(self, MainWindow):
self.alignregionButton.setText(_translate("MainWindow", "Align Region"))
self.groupDummySplitsCheckBox.setText(_translate("MainWindow", "Group dummy splits when undoing/skipping"))
self.selectwindowButton.setText(_translate("MainWindow", "Select Window"))
self.imageloopLabel.setText(_translate("MainWindow", "Image Loop #:"))
self.imageloopLabel.setText(_translate("MainWindow", "Image Loop:"))
self.pausehotkeyLabel.setText(_translate("MainWindow", "Pause"))
self.setpausehotkeyButton.setText(_translate("MainWindow", "Set Hotkey"))
self.loopCheckBox.setText(_translate("MainWindow", "Loop Split Images"))
Expand Down

1 comment on commit b1f1b32

@Toufool
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this gives more room for the loop #/total loop #. i dont think anyone should have more than 999 splits lol

Please sign in to comment.