Upgrade Theme to a C++ QObject, and unlock customization of default color schemes for custom apps#7076
Merged
kaustuvpokharel merged 15 commits intomasterfrom Feb 24, 2026
Merged
Upgrade Theme to a C++ QObject, and unlock customization of default color schemes for custom apps#7076kaustuvpokharel merged 15 commits intomasterfrom
kaustuvpokharel merged 15 commits intomasterfrom
Conversation
Collaborator
📱 Android buildsDownload an Android arm64 build of this PR for testing. Other Android architectures🍎 MacOS DMG universal buildsDownload a MacOS DMG universal build of this PR for testing. 🪟 Windows buildsDownload a Windows build of this PR for testing. 🐧 Linux AppImage buildsDownload a Linux AppImage build of this PR for testing. |
nirvn
reviewed
Feb 23, 2026
51dad52 to
97cbcef
Compare
nirvn
reviewed
Feb 23, 2026
addd973 to
be0f1d7
Compare
6f604f0 to
ff17d6a
Compare
ff17d6a to
7ddbe85
Compare
nirvn
approved these changes
Feb 23, 2026
89a3372 to
9bfef6a
Compare
cfcf9d9 to
36f204e
Compare
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.
This PR replaces the legacy Theme.qml singleton with a new C++ Theme singleton that exposes the same theme API to QML (Theme.mainColor, Theme.darkTheme, Theme.applyAppearance(), etc), while loading theme values from a JSON file
The goal was to keep QML usage as unchanged as possible while moving theme logic to a more scalable and maintainable engine
What changed
Reason
The old Theme.qml worked well, but to overcome these:
The new C++ implementation gives us:
Compatibility / Migration
This PR is designed to be a drop-in replacement for most existing QML usage.
Existing QML calls like:
continue to work through the new C++ singleton.
Additionally, darkThemeColors and lightThemeColors are exposed for compatibility with QML code that reads the palette maps directly.
Implementation details
A demo of minor tweak in the json transforming whole qfield, (not intended to disturb branding just a test run):
Screen.Recording.2026-02-22.at.10.55.08.PM.mov