Skip to content

Commit d494e5a

Browse files
authored
Backport improved spacing from dev (#217)
- Main and settings window are slightly wider - Shifted everything to the right in the main window to give more place to the left column - Re-aligned elements in the left column - All windows have an even pixel size - All buttons are at least 24px high - Increase spacing between horizontal label elements to account for weird DPI issues on some machines - Max FPS button has been made larger so the text doesn't cut off - X, Y, Width and Height combo boxes have all been made larger to fit 4 numbers - Re-aligned hotkeys elements - Give more height to multiline labels - Align the logo in the about page to the right - Update checker text is all shifted to the left - Remove extra leftover `btn_donateCC_LG` pixmap in about (we use html to render the image with a link) - tabstop on the hotkey buttons, not the input fields Designer view: ![image](https://user-images.githubusercontent.com/1350584/233792189-8b743b92-3168-4531-bc4d-56890baec402.png) Sanity check on Windows 10: ![image](https://user-images.githubusercontent.com/1350584/233792200-6d3c054d-2bf7-43dc-9bd1-26d9760b0142.png)
1 parent 7428d19 commit d494e5a

10 files changed

+226
-228
lines changed

Diff for: .flake8

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[flake8]
2-
color=always
3-
max-line-length=120
2+
color = always
3+
max-line-length = 120
44
; Auto generated
5-
exclude=src/gen/, typings/cv2-stubs/__init__.pyi
6-
ignore=
7-
; Linebreak before binary operator
8-
W503,
9-
; Closing bracket may not match multi-line method invocation style (enforced by add-trailing-comma)
10-
E124,
11-
; Allow imports at the bottom of file
12-
E402,
13-
; Not using typing_extensions
14-
Y026,
15-
; contextlib.suppress is roughly 3x slower than try/except
16-
SIM105,
17-
; False positives for attribute docstrings
18-
CCE001,
19-
per-file-ignores=
5+
exclude = src/gen/, typings/cv2-stubs/__init__.pyi
6+
ignore =
7+
; Linebreak before binary operator
8+
W503,
9+
; Closing bracket may not match multi-line method invocation style (enforced by add-trailing-comma)
10+
E124,
11+
; Allow imports at the bottom of file
12+
E402,
13+
; Not using typing_extensions
14+
Y026,
15+
; contextlib.suppress is roughly 3x slower than try/except
16+
SIM105,
17+
; False positives for attribute docstrings
18+
CCE001,
19+
per-file-ignores =
2020
; Quotes
2121
; Allow ... on same line as class
2222
; Allow ... on same line as def
@@ -30,8 +30,8 @@ per-file-ignores=
3030
; mypy 3.7 Union issue
3131
*.pyi: Q000,E701,E704,E501,N8,A001,A002,A003,CCE002,F401,Y037
3232
; PyQt methods
33-
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
33+
ignore-names = closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
3434
; McCabe max-complexity is also taken care of by Pylint and doesn't fail the build there
3535
; So this is the hard limit
36-
max-complexity=32
37-
inline-quotes=double
36+
max-complexity = 32
37+
inline-quotes = double

Diff for: .pre-commit-config.yaml

+7-6
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ repos:
1717
hooks:
1818
- id: pretty-format-ini
1919
args: [--autofix]
20-
- repo: https://github.com/charliermarsh/ruff-pre-commit
21-
rev: "v0.0.262" # Must match requirements-dev.txt
22-
hooks:
23-
- id: ruff
24-
args: [--fix]
20+
# TODO: Re-enable in dev, master doesn't have Ruff configs
21+
# - repo: https://github.com/charliermarsh/ruff-pre-commit
22+
# rev: "v0.0.262" # Must match requirements-dev.txt
23+
# hooks:
24+
# - id: ruff
25+
# args: [--fix]
2526
- repo: https://github.com/pre-commit/mirrors-autopep8
2627
rev: "v2.0.2" # Must match requirements-dev.txt
2728
hooks:
@@ -30,7 +31,7 @@ repos:
3031
rev: v2.4.0 # Must match requirements-dev.txt
3132
hooks:
3233
- id: add-trailing-comma
33-
34+
3435
ci:
3536
skip:
3637
# Ignore until Linux support. We don't want lf everywhere yet

Diff for: .vscode/settings.json

+14
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,18 @@
141141
"terminal.integrated.defaultProfile.windows": "PowerShell",
142142
"xml.codeLens.enabled": true,
143143
"xml.format.spaceBeforeEmptyCloseTag": false,
144+
"xml.format.preserveSpace": [
145+
// Default
146+
"xsl:text",
147+
"xsl:comment",
148+
"xsl:processing-instruction",
149+
"literallayout",
150+
"programlisting",
151+
"screen",
152+
"synopsis",
153+
"pre",
154+
"xd:pre",
155+
// Custom
156+
"string"
157+
]
144158
}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ If this option is disabled, when the reset hotkey is hit, the reset button is pr
170170
- `002_SplitName_(0.9)_[10]_{d}.png` is the second split image with a threshold of 0.9, pause time of 10, and is a dummy split.
171171
- `003_SplitName_(0.85)_[20]_#3500#.png` is the third split image with a threshold of 0.85, pause time of 20 and has a delay split time of 3.5 seconds.
172172
- `004_SplitName_(0.9)_[10]_#3500#_@3@_{b}.png` is the fourth split image with a threshold of 0.9, pause time of 10 seconds, delay split time of 3.5 seconds, will loop 3 times, and will split when similarity is below the threshold rather than above.
173-
173+
174174
## Special images
175175

176176
### How to Create a Masked Image

Diff for: mypy.ini

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
; We don't run mypy in the CI. This is just to help anyone who would like to use it manually.
22
; Namely, the mypy_primer tool.
33
[mypy]
4-
strict=true
4+
strict = true
55
; Implicit return types !
6-
disallow_untyped_calls=false
7-
disallow_untyped_defs=false
8-
disallow_incomplete_defs=false
6+
disallow_untyped_calls = false
7+
disallow_untyped_defs = false
8+
disallow_incomplete_defs = false
99

1010
; Of course my stubs are going to be incomplete. Otherwise they'd be on typeshed!
1111
; Mypy becomes really whack with its errors inside these stubs though
12-
mypy_path=typings,src
12+
mypy_path = typings,src
1313
; exclude doesn't work with strict=true Why?
14-
exclude=.*(typings|gen)/.*
14+
exclude = .*(typings|gen)/.*
1515

1616
[mypy-gen.*,cv2.*,]
1717
; strict=false ; Doesn't work in overrides
18-
follow_imports=skip
19-
implicit_reexport=true
20-
strict_optional=false
21-
disable_error_code=attr-defined, misc, name-defined
18+
follow_imports = skip
19+
implicit_reexport = true
20+
strict_optional = false
21+
disable_error_code = attr-defined, misc, name-defined

Diff for: res/about.ui

+3-8
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
</property>
3333
<property name="windowIcon">
3434
<iconset resource="resources.qrc">
35-
<normaloff>:/resources/icon.ico</normaloff>
36-
:/resources/icon.ico
37-
</iconset>
35+
<normaloff>:/resources/icon.ico</normaloff>:/resources/icon.ico</iconset>
3836
</property>
3937
<widget class="QPushButton" name="ok_button">
4038
<property name="geometry">
@@ -81,7 +79,7 @@
8179
<x>10</x>
8280
<y>90</y>
8381
<width>241</width>
84-
<height>41</height>
82+
<height>51</height>
8583
</rect>
8684
</property>
8785
<property name="text">
@@ -105,17 +103,14 @@ Thank you!</string>
105103
<property name="text">
106104
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;amp;business=BYRHQG69YRHBA&amp;amp;item_name=AutoSplit+development&amp;amp;currency_code=USD&amp;amp;source=url&quot;&gt;&lt;img src=&quot;:/resources/btn_donateCC_LG.png&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
107105
</property>
108-
<property name="pixmap">
109-
<pixmap resource="resources.qrc">:/resources/btn_donateCC_LG.png</pixmap>
110-
</property>
111106
<property name="alignment">
112107
<set>Qt::AlignCenter</set>
113108
</property>
114109
</widget>
115110
<widget class="QLabel" name="icon_label">
116111
<property name="geometry">
117112
<rect>
118-
<x>181</x>
113+
<x>190</x>
119114
<y>17</y>
120115
<width>64</width>
121116
<height>64</height>

0 commit comments

Comments
 (0)