Skip to content

[WIP] Application theming support#1889

Draft
scribblemaniac wants to merge 10 commits into
pencil2d:masterfrom
scribblemaniac:dark-mode
Draft

[WIP] Application theming support#1889
scribblemaniac wants to merge 10 commits into
pencil2d:masterfrom
scribblemaniac:dark-mode

Conversation

@scribblemaniac

Copy link
Copy Markdown
Member

Breeze + Rosé Pine screenshot

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 -style CLI 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:

  • Icon theme switching. We ideally should at least have a variation on the current icon set for dark color palettes. I don't intend to design all the dark icon versions for this PR, but I would like to at least set up the system for switching between icons to make it easier to design and test them in the (hopefully not to distant) future.
  • Translations for built-in color palette names? I am undecided on if this is a good idea or not. I also don't know how to implement it given that the display names taken from the conf files, not hard-coded strings.
  • New icons for the add and remove theme color palette actions. I've reused the icons for adding and removing the non-theme color palettes, but this could cause some confusion and I would rather they be distinct. If someone wants to make these please let me know.
  • Unit tests.

Known issues:

  • Some things do not update upon changing the color palette. So far I've noticed this with the color wheel background, the preset list in preferences. Less consistently, there will be issues with the action toolbar or the timeline. If you notice anything else that is not updated, please tell me.
  • The color box color preview does not fill up the whole area with some styles.

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

Breeze + Gruvbox  screenshot

Fusion + Macchiato

Fusion + Macchiato  screenshot

Windows + Ia Ora

Windows + Ia Ora screenshot

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.

Kvantum Daemon-2.0 screenshot

@scribblemaniac scribblemaniac added Enhancement UI Related to the visual appearance of the program 🔹 Minor PR (only one reviewer required) labels Nov 7, 2024
@MrStevns MrStevns marked this pull request as draft November 8, 2024 06:05
@MrStevns

MrStevns commented Nov 8, 2024

Copy link
Copy Markdown
Member

This looks very nice! good work scribble.

I've changed it to a draft for now and I'll try it out later

@MrStevns

MrStevns commented Nov 8, 2024

Copy link
Copy Markdown
Member

Tested with Qt 5.15.10

MacOS - Gruvbox light image
MacOS - Gruvbox dark image
MacOS - Darker image

First couple of observations:

  • Palette works and looks mostly fine in light mode, although styling is in general a lot more subtle. I only see changes to background color, and selection highlights.
  • Dark palette styles render some labels near or entirely invisible. The problem seen on "darker" would probably be fixed if the drop down had been styled properly.
  • Dark palettes in general looks pretty bad because a lot of the native components do not adjust to the dark styling.

Fusion:

  • Fusion styles looks nice and works well in all cases.

Windows:
Windows styling looks fine too on macOS, the only observation i have that is a bit odd is that the close, maximize and minimize button looks like the macOS buttons but scaled down.

Windows - Arc Dark image

@MrStevns

MrStevns commented Feb 2, 2026

Copy link
Copy Markdown
Member

I've been making progress on macOS side...

Together with #1982 and a bunch of other fixes and smaller tweaks for macOS specifically and some global stylesheet changes as well. We can now have it looking like this:

image image image

I expect to create a PR you can check out later, unless you want me to push these changes directly to your branch?

I have also fixed that the titlebar icons do not update when the palette changes.

@scribblemaniac

Copy link
Copy Markdown
Member Author

@MrStevns Thank you so much for the assist. I'm looking forward to seeing this get into Pencil2D. Please make a PR for it and I'll make some time to review your changes. 👍

@MrStevns

MrStevns commented Feb 7, 2026

Copy link
Copy Markdown
Member

I have created a PR for you to review.

As mentioned you can of course pick and choose as you see fit but I made the changes according to various tests over several days. :)

Screenshots image image image image

@scribblemaniac scribblemaniac force-pushed the dark-mode branch 2 times, most recently from 36fcc26 to 283a7e7 Compare February 18, 2026 06:41
@zezy123

zezy123 commented Jun 17, 2026

Copy link
Copy Markdown

How do I install this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement 🔹 Minor PR (only one reviewer required) UI Related to the visual appearance of the program

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

Add support for custom themes

3 participants