Implementation of Dark UI Theme (Not editor theme)

Hello,

I know this has been talked about in the past, but I am still quite frustrated that this has not been implemented. Is there any way to implement a dark UI theme into KiCAD? I primarily use KiCAD in my personal work, but work in Altium for School and Career. Altium’s dark UI is extremely nice for me, as I am very light sensitive. I know that it is possible on Linux due to GTK theme implementation, but is this at all possible on Windows? Thank you for your time.

-Taylor

1 Like

Currently not possible, as according to the Developers, MS does not publish the API for supporting dark mode on Win10.

It’s not that it’s impossible, obviously some programs support dark mode on windows (the missing API refers to automatic detection of dark mode, which can be done by reading registry in leu of proper API). Problem is that it’s not supported by wxwidgets on windows therefore will need to be implemented completely manually which is not worth the effort.

2 Likes

And there wouldn’t even be need to detect the mode automatically, it could be selected in the application UI, which some applications do. But because apparently wxWidgets can’t support dark theme it’s as qu1ck said: not worth the effort. See for example https://forums.wxwidgets.org/viewtopic.php?t=45869.

There is no problem detecting whether the user has set the dark mode preference. That part is easy (although done via undocumented methods)

The problem is actually having the UI controls (widgets) drawn in a dark theme. Most of wxWidgets controls use native underlying controls, which means win32 controls on Windows. Microsoft did not implement dark mode support in the win32 API, only in UWP.

That means if you see Dark Mode in a Windows program, one of two things is the case:

  1. The program is using UWP, a new api/platform that bypasses the win32 controls (not supported by wx)
  2. The program does not use native controls at all, and instead uses entirely custom controls rendering. This allows them to implement their own dark theme (Altium, most web browsers, some Qt apps, most Electron apps that are basically just webpages, etc)

Windows Explorer is kind of a special case – it uses win32 APIs, but it has dark mode! That’s because Microsoft decided to hack dark mode into it, and support it just for the controls needed in Explorer, and not in a way that can be re-used by other applications that aren’t part of Windows itself.

It is not realistic for KiCad (or wxWidgets) to move to entirely custom control rendering in order to implement our own UI theme, unfortunately. So, true support for the “dark mode” toggle in Windows 10 will have to wait until Microsoft makes it work for all applications the way they made it work for Explorer.

Side note: the Dark Mode toggle is not the only way to get a dark theme in Windows 10. There is also the High Contrast accessibility color themes, and these do work with the Win32 APIs, and therefore work with KiCad nightly! This kind of proves that it is not that big of an effort on Microsoft’s part to just make the normal dark mode theme work on win32, so it is frustrating that they haven’t done so yet.

3 Likes

There is a major Windows GUI redesign coming in the next major update in Fall, that is where their effort lies.
Windows are getting rounded corners :the horror:
Also on the todo list is updating of older UI elements so there’s hope for win32 dark mode.

UWP is now dead.

All hail WinUI3, the new new platform except it’s now available to win32 applications.

1 Like

@craftyjon Thanks for expanding on my post, that’s what I meant by manual implementation (basically how adobe and the like do it)

@marekr I like the sound of that. I just wish they didn’t kill/cripple the control panel in their rush to reimplement things in new ui.

1 Like

Meanwhile in the land of hot glue

1 Like

God that looks amazing. Thank you very much for the in-depth response. I look forward to seeing what comes! Do you think dark mode will be implemented in the big Six Oh?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.