Skip to content

Force Fusion style for PySide6 UI - #1585

Merged
dxqb merged 3 commits into
Nerogar:mergefrom
dxqb:pyside6-fusion-style
Jul 5, 2026
Merged

Force Fusion style for PySide6 UI#1585
dxqb merged 3 commits into
Nerogar:mergefrom
dxqb:pyside6-fusion-style

Conversation

@dxqb

@dxqb dxqb commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

The PySide6 UI looks noticeably flatter on Windows than on Linux (washed-out checkboxes/buttons, no accent color on progress bars). create_application() in modules/util/ui/pyside6_util.py never calls QApplication.setStyle(...), so Qt falls back to the native platform style (windowsvista on Windows, effectively Fusion on Linux). Once an application-wide stylesheet is set (as this code does), native styles like windowsvista can no longer fully delegate painting of standard controls to the OS theme APIs, so they render with a generic, flat fallback. Fusion is Qt's own cross-platform style and paints correctly regardless of stylesheets, which is why Linux already looks fine. This PR forces Fusion on all platforms so the UI looks the same everywhere.

Test plan

  • pre-commit run --all-files passes
  • Launched the affected UI or script and exercised the change
  • Tested with at least one real preset / config when relevant (note which: ____)

Verified on Linux (no visible regression, matches prior appearance). Not yet verified on Windows — opening as a draft for discussion/testing since I don't have a Windows machine to confirm the fix visually.

AI assistance

  • Early AI prototype — opened for discussion, not ready for review

Drafted by Claude

dxqb and others added 3 commits July 5, 2026 11:46
Native styles (e.g. windowsvista) draw standard controls via OS theme
APIs, which breaks once an application stylesheet is set, producing a
flatter/washed-out look on Windows compared to Linux.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
scripts/train_ui.py was split into train_ui_ctk.py and train_ui_qt.py, but
these two launchers still checked for the old filename as their "are you
in the right folder" guard, so they always failed with "you have done
something very wrong. Reclone the repository." start-ui.bat already checks
for train_ui_qt.py; apply the same fix here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dxqb
dxqb marked this pull request as ready for review July 5, 2026 10:34
@dxqb
dxqb merged commit 978d38b into Nerogar:merge Jul 5, 2026
1 check passed
@dxqb
dxqb deleted the pyside6-fusion-style branch July 5, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant