Dark theme for Picard

I am not familiar with W10’s ‘dark mode’, but I am a big fan of dark themes in applications.
How would this work for W10? Could you set Picard to use a dark theme independently, or would you need to set W10 to a dark theme, and would Picard then follow?

(I would hope for the first)

Agreed, I hope it could be set independently (although I do run W10 in dark mode)

I don’t, because I don’t like all aspects of it and I have done some other tweaks.
So I am hoping for an independent setting in Picard that will be ignorant of Windows 10 ‘App’ settings.

Hey, how do I do this with Picard 2.31 running under Ubuntu 20,04 LTS with the default GNOME interface?

UPDATE: I found out how to do it: installed adwaita-qt then did this:

echo "export QT_STYLE_OVERRIDE=Adwaita-Dark" >> ~/.profile

and restarted session. Now I have not only Picard, but all QT5 apps in a good dark view. My eyes are thankful :sunglasses:

1 Like

@ecceccecc I also downloadd adwaita-qt and installed it, then added that same line to ~/.profile, eagerly restarted my session and… nothing happened. Picard is still all light and hurting my eyes. Does anyone have a suggestion?
I also tried kvantum, but that doesn’t work for me either. I am running Linux Mint 19.3 with the Cinnamon DE.

At least it works under GNOME - under Cinnamon I never tried

Is there a way to force Picard using the dark theme without having your Windows 10 in dark theme?

1 Like

AFAIK, not yet. If you’re running from source, the magic happens in this function

Forcing it to return ‘True’ forces the dark theme

dark_theme = True  # insert this line
return dark_theme
1 Like

Thanks, but I don’t know what that means.
I am using portable installs. Can it be done with those?

Oh, my bad. Source = source code, basically downloading the repository in the link, installing python and other dependencies and launching Picard from the terminal/console. You have full access to modify the program.

I don’t think so.

2 Likes

Thnx.
Since Picard has a very active ‘making dreams come true’ developer ( @outsidecontext ) , let’s hope a manual setting for dark theme can be implemented some day.

(not saying the other developers of Picard aren’t active :wink:

1 Like

I’m not too keen on implementing this to be honest, mostly because of how this would work cross platform. But yes, maybe have this for Windows only. In general this theming is handled by Qt, the UI library being used. So there are different cases how this currently works:

  1. On macOS the OS tells the app that dark mode is enabled. Qt already detects this and switches the colors accordingly (respecting e.g. the highlight color the user chose in the OS’s settings). From Picard’s perspective we have not much impact on this, except that we can detect that we are running in dark mode and adjust some colors accordingly (1).

  2. On Linux depending on the desktop environment in use there is either no dark mode supported or the systems sets a specific color palette and Qt uses this. There is also the Picard option for the user to choose to use the system’s theme (this option is not available on macOS or Windows), which might or might not be dark. We don’t have a direct way to detect if the current theme is considered dark or not, but we check for the background color of the theme to decide on some colors to switch.

  3. On Windows Qt has no built-in support for any dark theme handling. Hence we have implemented switching the color palette ourselves (it either uses the default palette of Qt for light theme, or a custom dark palette which was designed to match the colors used by Windows 10).

We could add the dark mode switch option maybe for Windows only, as it would be rather easy to support there. For the Linux case I would not do it, that would require us to define both a dark and light palette hard coded and use that, overwriting what was provided by the system. Considering how different the visuals is there and the Linux user’s desire to use their preferred look and feel across apps this complicates things. For macOS it is similar, we would need to both define a dark and light palette (that fits the default) and make sure it does not interfere with Qt’s own color switching.

Update: I added https://tickets.metabrainz.org/browse/PICARD-2095


(1) Side note: macOS users will rightly notice that it does not work that way at all and Picard has no dark mode support on macOS at all. That’s also true, and it is because macOS thinks our packaged builds are not supporting dark mode. That’s a open problem to solve. But it works as described if one runs e.g. Picard from source.

4 Likes

You mean 2095 :wink:

(blabla to reach enough characters to have this post allowed :face_with_raised_eyebrow:

1 Like

Yes, please, make it optional on Windows even if Windows itself is set to dark mode.
Thanks

Feature in the works. Only needs more testing and translation stuff (which I don’t remember how to do…) :slight_smile:

3 Likes

@outsidecontext I’ve found something very intriguing on MacOS.
Trying to force a theme inside the theme infrastructure failed in a very weird way.

By failing I mean this.

Still debugging, but I have the impression InterfaceColor is picking the system color before the Theme is properly setup. (or I’m just saying nonsense again… :smile:)

Update:

Almost there (it really was my usual nonsense...).

Update 2: working on Windows and Mac. Missing translation the translation part.

2 Likes

The theme switching is now part of the just released beta 3. Thanks a lot @gabrielcarvfer !

5 Likes

Indeed, thanks a lot @gabrielcarvfer, looking good!

Is the main panel’s headerbar ‘out-of-reach’ for skinning?
(W10)

Yes, unless the application hides the system’s headerbar and implements its own. Something I honestly don’t want to do for Picard.

2 Likes