Command line parameter to start TC in a dark mode

Here you can propose new features, make suggestions etc.

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:

Command line parameter to start TC in a dark mode

Post 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.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

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

Post 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.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

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

Post 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.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
Author of Total Commander
https://www.ghisler.com
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

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

Post 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…)
Andrzej P. Wozniak
Polish subforum moderator
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post 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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

Maybe if I can find a solution for the menus and scrollbar colors...
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post 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?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
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: Command line parameter to start TC in a dark mode

Post 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)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply