Command line parameter to start TC in a dark mode

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

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

Command line parameter to start TC in a dark mode

Post by *DrShark » 2019-10-19, 10:58 UTC

ghisler(Author) wrote:
2019-08-12, 13:39 UTC
Unfortunately 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.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

umbra
Power Member
Power Member
Posts: 807
Joined: 2012-01-14, 20:41 UTC

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

Post by *umbra » 2019-10-19, 11:10 UTC

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: 634
Joined: 2011-03-11, 10:11 UTC

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

Post by *Usher » 2019-10-19, 14:41 UTC

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.
Regards from Poland
Andrzej P. Wozniak

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38438
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) » 2019-10-21, 15:18 UTC

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
http://www.ghisler.com

User avatar
Usher
Power Member
Power Member
Posts: 634
Joined: 2011-03-11, 10:11 UTC

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

Post by *Usher » 2019-10-21, 16:52 UTC

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…)
Regards from Poland
Andrzej P. Wozniak

User avatar
MVV
Power Member
Power Member
Posts: 8410
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post by *MVV » 2019-10-22, 09:31 UTC

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: 38438
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) » 2019-10-22, 15:29 UTC

Maybe if I can find a solution for the menus and scrollbar colors...
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8410
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post by *MVV » 2019-10-23, 07:58 UTC

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: 38438
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) » 2019-10-24, 09:34 UTC

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
http://www.ghisler.com

Post Reply