Skip to content

Commit dfe387b

Browse files
committed
Fix build
1 parent ef800b1 commit dfe387b

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

scripts/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ flake8-pyi>=22.8.1 # flake8 5 support
1919
flake8-quotes
2020
flake8-simplify
2121
pep8-naming
22-
pylint>=2.13.9 # Respect ignore configuration options with --recursive=y
22+
pylint>=2.13.9,<3.0.0 # Respect ignore configuration options with --recursive=y # 3.0 still in pre-release
2323
pyright
2424
#
2525
# Run `./scripts/designer.ps1` to quickly open the bundled PyQt Designer.

scripts/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
numpy>=1.23 # Updated types
1414
opencv-python-headless>=4.5.4,<4.6 # https://github.com/pyinstaller/pyinstaller/issues/6889
1515
PyQt6>=6.2.1 # Python 3.10 support
16-
git+https://github.com/Avasam/imagehash.git@patch-2#egg=ImageHash # Contains type information + setup as package not module
16+
git+https://github.com/JohannesBuchner/imagehash.git#egg=ImageHash # Contains type information + setup as package not module
1717
keyboard
1818
packaging
1919
Pillow

src/capture_method/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from enum import Enum, EnumMeta, unique
77
from typing import TYPE_CHECKING, TypedDict
88

9-
import cv2
109
from pygrabber import dshow_graph
1110
from winsdk.windows.media.capture import MediaCapture
1211

src/menu_bar.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ def __set_all_capture_devices(self):
180180
else:
181181
self.capture_device_combobox.setPlaceholderText("No device found.")
182182

183-
def __init__(self, autosplit: AutoSplit):
184-
super().__init__()
185-
self.setupUi(self)
186-
self.autosplit = autosplit
183+
def __apply_os_specific_ui_fixes(self):
187184
# Spinbox frame disappears and reappears on Windows 11. It's much cleaner to just disable them.
188185
# Most likely related: https://bugreports.qt.io/browse/QTBUG-95215?jql=labels%20%3D%20Windows11
189186
# Arrow buttons tend to move a lot as well
@@ -192,9 +189,8 @@ def __init__(self, autosplit: AutoSplit):
192189
self.default_similarity_threshold_spinbox.setFrame(False)
193190
self.default_delay_time_spinbox.setFrame(False)
194191
self.default_pause_time_spinbox.setFrame(False)
195-
# Don't autofocus any particular field
196-
self.setFocus()
197192

193+
def __set_readme_link(self):
198194
self.custom_image_settings_info_label.setText(
199195
self.custom_image_settings_info_label
200196
.text()
@@ -205,6 +201,15 @@ def __init__(self, autosplit: AutoSplit):
205201
lambda: webbrowser.open(f"https://github.com/{GITHUB_REPOSITORY}#readme"))
206202
self.readme_link_button.setStyleSheet("border: 0px; background-color:rgba(0,0,0,0%);")
207203

204+
def __init__(self, autosplit: AutoSplit):
205+
super().__init__()
206+
self.setupUi(self)
207+
self.autosplit = autosplit
208+
self.__apply_os_specific_ui_fixes()
209+
self.__set_readme_link()
210+
# Don't autofocus any particular field
211+
self.setFocus()
212+
208213

209214
# region Build the Capture method combobox
210215
capture_method_values = CAPTURE_METHODS.values()

0 commit comments

Comments
 (0)