Dark Mode: white text of some menus with light Windows 10 theme

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Dark Mode: white text of some menus with light Windows 10 theme

Post by *DrShark »

To reproduce:
1. Make sure Windows 10 theme DOES NOT use dark mode.
2. Start TC with default ini, switch it to dark mode (e.g. with cm_switchdarkmode).
3. Restart TC.
4. Open some menus like file context menu, button bar context menu, directory hotlist or history:
they will use light theme, but also with white text.

Note: scrollbars will also be light, it seems in this case TC doesn't apply dark theme to scrollbars in a way as it does on older Windows versions where dark mode is not implemented in system itself.

Reproduced on Total Commander 9.50 beta 11 x32 and x64, Windows 10 1903 (18362.535).
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Mode: white text of some menus with light Windows 10 theme

Post by *petermad »

I cannot reproduce this on Windows 10 1909 in neither 32bit nor 64bit TC 9.5b11

But notice that I use Windows 10 1909 not 1903 as DrShark
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode: white text of some menus with light Windows 10 theme

Post by *ghisler(Author) »

Not confirmed so far, but I'm also on 1909...
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Dark Mode: white text of some menus with light Windows 10 theme

Post by *DrShark »

Christian Ghisler reproduced the problem with my theme file. From email:
Christian Ghisler wrote:I [...] found out that [in this case] the problem seems to be a missing or invalid theme: "Darkmode_Explorer".

Total Commander sets this theme with SetWindowTheme to the listboxes, scrollbars etc.

In the 32-bit version, I have now added code where I create a hidden window, call SetWindowTheme on it, and then draw a scrollbar background in memory using this theme. If the drawn part is dark, then "Darkmode_Explorer" is present
and work, and if not, I switch to the emulated dark mode.

Currently this is only in the 32-bit version, but I will also move it to 64-bit if it works well. You cannot override this option with ForceDarkModeOptions=1.
history950.txt wrote:15.01.20 Fixed: Use simulated dark mode also on Windows 10 1809 and later if scrollbars with theme "DarkMode_Explorer" aren't dark, otherwise we will sometimes get white on white context menus (32)
I tried 32-bit TC 9.50 beta 13, and simulated dark mode works on my problem Windows 10 1903 as expected: scrollbars/spinbars are dark, context menus are light with black text.

Looking forward for next beta to try 64-bit Total Commander.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Dark Mode: white text of some menus with light Windows 10 theme

Post by *DrShark »

In 9.50 RC1, 64-bit TC now seems to also use emulated dark mode with ForceDarkModeoptions=1 on that W10 machine, but I only tested it briefly because of that notebook's hardware damage (details in my other post).
So for now problem may be considered as resolved.

I'll post here again if something will be wrong with it later after/if notebook will be repaired.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode: white text of some menus with light Windows 10 theme

Post by *ghisler(Author) »

Great, thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply