feat(theme): add support for matugen smart mode and type - #3109
feat(theme): add support for matugen smart mode and type#3109haikalllp wants to merge 9 commits into
Conversation
…scheme for the pallete drop down
56b4980 to
438f817
Compare
|
/claude review |
Claude reviewFeature looks sound overall; three issues, one of which will disable the new setting on its own.
Checked: matugen smart mode/scheme resolution and version gating in Go, queue/handler wiring, preview |
|
Do I fix these issues @bbedward ? They seem valid to me.. |
|
/claude review |
1 similar comment
|
/claude review |
Thanks! |
| return false; | ||
| if (typeof SessionData !== "undefined" && SessionData.themeModeAutoEnabled) | ||
| return false; | ||
| if (SettingsData.matugenSmartMode) |
There was a problem hiding this comment.
matugenSmartMode is checked as if it were always in effect, but it only does anything on the dynamic theme — setDesiredTheme only sends mode: "smart" when kind === "image" && !stockColors (Theme.qml:1507), and every stock/custom theme goes down the stockColors path.
So: enable "Auto From Wallpaper" on the dynamic theme, then switch to a stock theme. The setting stays true, nothing resolves the mode from the wallpaper any more, and this early return silently kills portal color-scheme sync. The user can't turn it back on either — the toggle is enabled: Theme.currentTheme === Theme.dynamic (ThemeColorsTab.qml:1331), so it's greyed out on a stock theme. Same for visible: matugenSmartCapable: if matugen is uninstalled or downgraded below 4.2 the row disappears entirely and the flag is stuck on.
Gating on "smart mode is actually driving the mode" fixes both, and the same guard is needed at DragDropGrid.qml:749, which otherwise labels the tile "Auto (Dark Mode)" on a stock theme where nothing is automatic.
| if (SettingsData.matugenSmartMode) | |
| if (SettingsData.matugenSmartMode && typeof Theme !== "undefined" && Theme.currentTheme === Theme.dynamic) |
Claude reviewOne finding this round; the three from the previous review are addressed.
Checked: smart mode/scheme resolution and 4.2 version gating in Go, |
Description
Adds support for matugen
--mode smartand--type scheme-smart.Btw, manual theme toggle still wins, and automatically disable the smart mode. There is no UI gating atm, because I thought the log is sufficient, and Matugen 4.2.0 is latest cargo release anyways.
Type of change
Related issues
none
Screenshots / video
showcase.mp4
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings