Skip to content

Commit

Permalink
Backport improved spacing from dev (#217)
Browse files Browse the repository at this point in the history
- 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)
  • Loading branch information
Avasam authored Apr 22, 2023
1 parent 7428d19 commit d494e5a
Show file tree
Hide file tree
Showing 10 changed files with 226 additions and 228 deletions.
40 changes: 20 additions & 20 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[flake8]
color=always
max-line-length=120
color = always
max-line-length = 120
; Auto generated
exclude=src/gen/, typings/cv2-stubs/__init__.pyi
ignore=
; Linebreak before binary operator
W503,
; Closing bracket may not match multi-line method invocation style (enforced by add-trailing-comma)
E124,
; Allow imports at the bottom of file
E402,
; Not using typing_extensions
Y026,
; contextlib.suppress is roughly 3x slower than try/except
SIM105,
; False positives for attribute docstrings
CCE001,
per-file-ignores=
exclude = src/gen/, typings/cv2-stubs/__init__.pyi
ignore =
; Linebreak before binary operator
W503,
; Closing bracket may not match multi-line method invocation style (enforced by add-trailing-comma)
E124,
; Allow imports at the bottom of file
E402,
; Not using typing_extensions
Y026,
; contextlib.suppress is roughly 3x slower than try/except
SIM105,
; False positives for attribute docstrings
CCE001,
per-file-ignores =
; Quotes
; Allow ... on same line as class
; Allow ... on same line as def
Expand All @@ -30,8 +30,8 @@ per-file-ignores=
; mypy 3.7 Union issue
*.pyi: Q000,E701,E704,E501,N8,A001,A002,A003,CCE002,F401,Y037
; PyQt methods
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
ignore-names = closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
; McCabe max-complexity is also taken care of by Pylint and doesn't fail the build there
; So this is the hard limit
max-complexity=32
inline-quotes=double
max-complexity = 32
inline-quotes = double
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ repos:
hooks:
- id: pretty-format-ini
args: [--autofix]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.262" # Must match requirements-dev.txt
hooks:
- id: ruff
args: [--fix]
# TODO: Re-enable in dev, master doesn't have Ruff configs
# - repo: https://github.com/charliermarsh/ruff-pre-commit
# rev: "v0.0.262" # Must match requirements-dev.txt
# hooks:
# - id: ruff
# args: [--fix]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: "v2.0.2" # Must match requirements-dev.txt
hooks:
Expand All @@ -30,7 +31,7 @@ repos:
rev: v2.4.0 # Must match requirements-dev.txt
hooks:
- id: add-trailing-comma

ci:
skip:
# Ignore until Linux support. We don't want lf everywhere yet
Expand Down
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,18 @@
"terminal.integrated.defaultProfile.windows": "PowerShell",
"xml.codeLens.enabled": true,
"xml.format.spaceBeforeEmptyCloseTag": false,
"xml.format.preserveSpace": [
// Default
"xsl:text",
"xsl:comment",
"xsl:processing-instruction",
"literallayout",
"programlisting",
"screen",
"synopsis",
"pre",
"xd:pre",
// Custom
"string"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ If this option is disabled, when the reset hotkey is hit, the reset button is pr
- `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.
- `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.
- `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.

## Special images

### How to Create a Masked Image
Expand Down
20 changes: 10 additions & 10 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
; We don't run mypy in the CI. This is just to help anyone who would like to use it manually.
; Namely, the mypy_primer tool.
[mypy]
strict=true
strict = true
; Implicit return types !
disallow_untyped_calls=false
disallow_untyped_defs=false
disallow_incomplete_defs=false
disallow_untyped_calls = false
disallow_untyped_defs = false
disallow_incomplete_defs = false

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

[mypy-gen.*,cv2.*,]
; strict=false ; Doesn't work in overrides
follow_imports=skip
implicit_reexport=true
strict_optional=false
disable_error_code=attr-defined, misc, name-defined
follow_imports = skip
implicit_reexport = true
strict_optional = false
disable_error_code = attr-defined, misc, name-defined
11 changes: 3 additions & 8 deletions res/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/resources/icon.ico</normaloff>
:/resources/icon.ico
</iconset>
<normaloff>:/resources/icon.ico</normaloff>:/resources/icon.ico</iconset>
</property>
<widget class="QPushButton" name="ok_button">
<property name="geometry">
Expand Down Expand Up @@ -81,7 +79,7 @@
<x>10</x>
<y>90</y>
<width>241</width>
<height>41</height>
<height>51</height>
</rect>
</property>
<property name="text">
Expand All @@ -105,17 +103,14 @@ Thank you!</string>
<property name="text">
<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>
</property>
<property name="pixmap">
<pixmap resource="resources.qrc">:/resources/btn_donateCC_LG.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="icon_label">
<property name="geometry">
<rect>
<x>181</x>
<x>190</x>
<y>17</y>
<width>64</width>
<height>64</height>
Expand Down
Loading

0 comments on commit d494e5a

Please sign in to comment.