Page 1 of 1

Command line parameter to start TC in a dark mode

Posted: 2019-10-19, 10:58 UTC
by DrShark
ghisler(Author) wrote: ↑2019-08-12, 13:39 UTCUnfortunately there is still a problem: If I change the mode between light and dark, everything can be changed except for the context menus - they only change color when I close and re-open TC. However, it works correctly when I change the mode in Windows itself and AllowDarkModeForApp is set to use the Windows setting. This means that there will be no toggle button for this option for the TC buttonbar. :(
It's sad that because of such a minor issue we don't have a command to toggle the dark mode. What about a command line parameter like /ForceDarkMode for Total Commander exe to enable the dark mode in a new TC instance even if dark mode is not activated in its configuration? This will allow to start using different LNK shortcuts dark and not dark TC instances while both will use the same wincmd.ini.

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-19, 11:10 UTC
by umbra
I'm curious. Is it that common to keep switching between light/dark modes? From what I have seen, people choose one and stick with it.

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-19, 14:41 UTC
by Usher
2umbra
Those people seem to not care about their health. You can change mode depending on external lighting and use dark mode only in the dark.

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-21, 15:18 UTC
by ghisler(Author)
I recommend switching dark mode on/off via Windows 10 settings. This way it will affect all apps, AND the context menus will also be correct in TC.

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-21, 16:52 UTC
by Usher
2ghisler(Author)
But it works only in Windows 10. Command line parameter is needed for older systems. You can create shortcut and run it manually or from scheduler, if you want to have automatic dark mode by night (yes, there must always be some workaround…)

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-22, 09:31 UTC
by MVV
I think internal command for switching dark mode would be more useful, because one could call it from some script for switching modes w/o restarting TC... And there is a plugin (Autorun) for executing commands on TC start.

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-22, 15:29 UTC
by ghisler(Author)
Maybe if I can find a solution for the menus and scrollbar colors...

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-23, 07:58 UTC
by MVV
Do menus and scrollbars support owner-draw mode? Or maybe there is a way to replace brushes/fonts/pens by e.g. processing some messages?

Re: Command line parameter to start TC in a dark mode

Posted: 2019-10-24, 09:34 UTC
by ghisler(Author)
Menus: Only the menu items, not the frame. I have now subclassed the menu and react to WM_PAINT to overdraw the frame, but it still flashes white for a short time when opening the menu. Scrollbars are already overdrawn by me in e.g. the configuration dialog where they are used to increase/decrease values. But the scrollbars in Listboxes aren't separate windows, they cannot be owerdrawn easily.

Re: Command line parameter to start TC in a dark mode

Posted: 2021-04-02, 12:22 UTC
by DrShark
This suggestion implemented in Total Commander 10.00 public beta 1:
history1000.txt wrote:22.10.20 Added: New command line parameter /M= to set dark mode option: 0=light, 1=auto (like Windows 10 apps), 2=dark (32/64)