[WIP] Application theming support #1889
Draft
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 is a work-in-progress implementation of a built-in theme switcher in Pencil2D (closes #801). With it you can change the style and color palette of the application from the preferences. This enables the oft-requested "dark mode" on platforms where there is no dark mode or where the version of Qt we use doesn't detect the dark mode setting (which is practically all of them).
The options for styles are any installed Qt styles that could be passed through the
-styleCLI option, which varies between platforms. On top of any style, a theme color palette can be set. These are defined in a format that is compatible with the one that qt5ct uses, with some optional additional metadata fields. I have collected several existing qt5ct palettes to provide default options, and users can add their own if they like.Features yet to be added:
Known issues:
I have made this pull request in this draft state as I am hoping some people will be able to test this and provide some feedback. Styles vary between platforms, so it would be a great help if we can get this tested on a variety of different systems and make sure that the built-in color palettes work well with whatever styles are available.
Download links for non-developer testing:
Windows: Qt 5 x86-64 | Qt 6 x86-64 | Qt 5 x86
macOS: Qt 5 x86-64 | Qt 6 x86-64 | Qt 5 arm64 | Qt 6 arm64
Linux*: Qt 5 x86-64
* In the Linux AppImages, only the styles that are bundled with the AppImage will be available, even if others are installed on the system.
And finally, some more glam shots:
Breeze + Gruvbox
Fusion + Macchiato
Windows + Ia Ora
Kvantum Daemon-2.0
You can get even crazier with custom styles or kvantum. This was always technically possible, but the theme switcher makes it a little bit easier to do.