Windows 10 Dark Mode

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
rocrail
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Windows 10 Dark Mode

Post by rocrail » Mon May 13, 2019 12:17 pm

Hi,

under macOS the Desktop Dark Mode is also reflected in wxWidgets based applications.
The same application remains 'Light mode' under Windows even if Windows has set Dark Mode.

The diff between both builds is that under macOS the Git master is used, and under Windows wxWidgets release 3.0.3.
Should I also build the Windows target with the Git master?
Best regards,
Rob.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2473
Joined: Sun Jan 03, 2010 5:45 pm

Re: Windows 10 Dark Mode

Post by PB » Mon May 13, 2019 12:44 pm

Just curious: Is there really a dark mode in Windows 10 that affects not only UWP but also Win32 applications (such as Notepad, Wordpad, MSPaint)?

Anyway, AFAIK the "dark mode" support has been introduced relatively recently and therefore is available only in the 3.1 branch and for MacOS only.

EDITI just tested (v1809): none of the applications mentioned above respond to the dark mode setting being on, also in a generic application colors returned by ::GetSysColor() seem to be the same. I could not find any information about there being a relevant compatibility manifest setting...

User avatar
rocrail
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: Windows 10 Dark Mode

Post by rocrail » Mon May 13, 2019 1:17 pm

Hi,

the Windows setting is found here:
win10dark.png
The File Explorer, Calendar, ... does change its color automatically, but other common Apps like Wordpad does not.
Best regards,
Rob.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4258
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Windows 10 Dark Mode

Post by ONEEYEMAN » Mon May 13, 2019 2:28 pm

Hi,
You should recompile with the Git HEAD on Windows.
But if my memory serves me right, the "Dark Mode" was introduced to OSX only.

Patches always welcome. ;-)

Thank you.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2473
Joined: Sun Jan 03, 2010 5:45 pm

Re: Windows 10 Dark Mode

Post by PB » Mon May 13, 2019 5:40 pm

rocrail wrote:
Mon May 13, 2019 1:17 pm
The File Explorer, Calendar, ... does change its color automatically, but other common Apps like Wordpad does not.
Calendar is not a Win32 application*. Adding dark mode to File Explorer, which is, was not that simple, i.e. it had to be done for this single application by hand.

Most of wxWidgets controls on MSW are wrappers of their native Win32 equivalents. UWP "features" are exposed to C++ Win32 applications via winrt API (which wxWidgets AFAIK currently uses only for wxNotificationMessage). The native Win32 controls seem to be unaware of dark mode so adding some winrt support (e.g. wxSystemSettings::GetColour() using UISettings::GetColorValue() instead of ::GetSysColor()) would probably not be that useful. And I am just guessing here but I do not think Microsoft will make it easy/easier by releasing a new version of Common Controls capable of dark mode, similarly to what they did for themed controls when going from Win98 to WinXP. MS wants everyone to go UWP and likely will not spend any money on teaching the old dog new tricks...

* By Win32 / native Windows application I mean an application which uses the controls available since many Windows versions ago, not the UWP ones.

catalin
Moderator
Moderator
Posts: 1583
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Windows 10 Dark Mode

Post by catalin » Wed May 15, 2019 10:38 am

PB wrote:
Mon May 13, 2019 5:40 pm
MS wants everyone to go UWP and likely will not spend any money on teaching the old dog new tricks...
Actually it seems that Microsoft wants to close the UWP, Win32 divide. But indeed, at lest for now, UWP-only features are not available through wxW.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2473
Joined: Sun Jan 03, 2010 5:45 pm

Re: Windows 10 Dark Mode

Post by PB » Wed May 15, 2019 11:15 am

catalin wrote:
Wed May 15, 2019 10:38 am
But indeed, at lest for now, UWP-only features are not available through wxW.
TBH, I cannot see wxWidgets adapting the UWP controls anytime soon. It would probably mean undertaking a great effort and creating a compatibility nightmare. Partially adopting UWP controls may not be that great either, mixing UWP and Win32 controls in a single app would look odd. I am not really familiar with UWP but to me it seems that the controls may not be well suited to rich desktop apps, think MSVS or MS Office...

Sadly, I think Windows desktop is not in a good state, with at least 3 different major technologies being used (Win32 vs UWP vs web browser-based).

thoray
Knows some wx things
Knows some wx things
Posts: 42
Joined: Sun Oct 18, 2015 9:31 am

Re: Windows 10 Dark Mode

Post by thoray » Tue Mar 10, 2020 2:53 pm

Is there any solution to make Win32 application build with wx to have dark theme?

What really should happen though is that Windows would add such feature.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2473
Joined: Sun Jan 03, 2010 5:45 pm

Re: Windows 10 Dark Mode

Post by PB » Thu Mar 12, 2020 1:54 pm

I believe that unfortunately nothing has changed since the posts I wrote on May 13, 2019.

mimi89999
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Apr 03, 2020 7:34 pm

Re: Windows 10 Dark Mode

Post by mimi89999 » Fri Apr 03, 2020 7:46 pm

Actually, there is https://github.com/ysc3839/win32-darkmode
There are many non UWP and non Electron/whatever apps that have a dark theme on Windows like Firefox (AFAIK they are using GTK). If you want, I can make a list of such apps and check what they are using.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2473
Joined: Sun Jan 03, 2010 5:45 pm

Re: Windows 10 Dark Mode

Post by PB » Fri Apr 03, 2020 9:00 pm

I had a look at that some time ago. Aside from being undocumented and relying on specific Windows 10 versions, is not the main problem that most Win32 controls do not actually support dark mode? AFAIK, the only ones that do are those used by File Explorer (window scrollbars, buttons, listview?) and window NC area.

I would say that Firefox basically draws every control by itself. As I wrote above, if the dark mode could be made to work for Win32 applications, why the built-in Win32 apps (Notepad, WordPad, Paint etc.) do not have it? I would say Win32 apps appearing dark went an extra mile and use custom-drawn controls (or a 3rd party theming library).

But I would like to be proven wrong.

mimi89999
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Apr 03, 2020 7:34 pm

Re: Windows 10 Dark Mode

Post by mimi89999 » Sat Apr 04, 2020 5:51 pm

Do you know exactly which controls are supported on Win32 dark or know any better way of checking that trying all of them? Even if some controls are not themed yet, maybe it would still be interesting for some wxWidgets apps to use those that are available (if they are only using those that are available)? Would adding an option to enable dark theme in wxWidgets API require much effort?

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2473
Joined: Sun Jan 03, 2010 5:45 pm

Re: Windows 10 Dark Mode

Post by PB » Sat Apr 04, 2020 6:48 pm

I do not think a list of Win32 controls supporting the dark mode is officially available but I suspect it is very short ( as I wrote above). I believe mixing the dark and normal controls would look VERY odd.

Just look at how even Microsoft people struggle making just a window frame work as expected in dark mode (see also the File Explorer link in one of my previous posts).
https://github.com/microsoft/terminal/issues/3425

So, did you find any programs using vanilla Win32 controls working well in dark mode?

Post Reply