Force Fusion style for PySide6 UI - #1585
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The PySide6 UI looks noticeably flatter on Windows than on Linux (washed-out checkboxes/buttons, no accent color on progress bars).
create_application()inmodules/util/ui/pyside6_util.pynever callsQApplication.setStyle(...), so Qt falls back to the native platform style (windowsvistaon Windows, effectivelyFusionon Linux). Once an application-wide stylesheet is set (as this code does), native styles likewindowsvistacan no longer fully delegate painting of standard controls to the OS theme APIs, so they render with a generic, flat fallback.Fusionis Qt's own cross-platform style and paints correctly regardless of stylesheets, which is why Linux already looks fine. This PR forcesFusionon all platforms so the UI looks the same everywhere.Test plan
pre-commit run --all-filespassesVerified 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
Drafted by Claude