fix(UI): Overhaul Rainbow Mode architecture #74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/rainbow-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit completely re-architects the Rainbow Mode feature to eliminate the massive performance degradation previously experienced in the Configuration and Properties menus.
The issue was caused by a "Global Hammer" approach, where a 150ms timer forced the entire application to re-parse a 10,000+ character CSS string. This triggered expensive layout recalculations for every checkbox, slider, and label in the emulator, leading to exponential lag. In testing when it was originally implemented, it was not as bad as it currently is today. With the UI everchanging and additions being added to it, the lag only continued to get worse.
Changes:
Centralized rainbow logic into a new RainbowStyle (QProxyStyle) engine.
Implemented a "Static Shell" architecture: Dialogs now set their base theme exactly once using the user's chosen accent color for inner settings.
Restructured the animation to use a different approach: The rainbow timer now only updates the specific containers holding navigation buttons (sidebars and top tabs).
Added support for dynamic :pressed and :hover states, ensuring the rainbow effect remains consistent during user interaction without reverting to static colors.
The result is a fluid, high-refresh-rate rainbow animation on the primary navigation elements with effectively zero CPU impact on the rest of the UI.