CHM Help for dark mode

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

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

CHM Help for dark mode

Post by *DrShark »

ghisler(Author) wrote:
2019-11-15, 14:59 UTC
Unfortunately you cannot tell Help to use dark mode. I would have to include two help files per language, one bright an one dark. :(
I don't know HTML and CHM format well enough, but is there a possibility to define the dark mode for pages in CHM using CSS and Javascript, and to use some kind of redirection so if TC is in dark mode, F1 will open pages with black background+white text style? Some info on CSS and Javascript support in CHM format available here.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9848
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: CHM Help for dark mode

Post by *petermad »

Right now totalcmd.chm uses the Registry setting for window background color and for window text color as set in:

Code: Select all

[HKEY_CURRENT_USER\Control Panel\Colors]
"Window"=
"WindowText"=
I have tried to make a dark version of totalcmd.chm, but I can only get the main window dark.

You can download it here: https://madsenworld.dk/tcmd/totalcmd950b5darkhelp.zip

EDIT:
I managed to make the index window partly dark: https://madsenworld.dk/tcmd/totalcmd950b5darkhelp2.zip

Apparantly this is a known limitation: https://community.adobe.com/t5/robohelp/applying-background-colour-to-navigation-pane-in-a-chm/td-p/2134644
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.10 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

petermad wrote:
2019-11-17, 03:36 UTC
Right now totalcmd.chm uses the Registry setting for window background color and for window text color as set in:

Code: Select all

[HKEY_CURRENT_USER\Control Panel\Colors]
"Window"=
"WindowText"=
Do you know what setting is used for text selection color of text found using CHM search feature? Here I have an issue with double selection in normal official CHM: I get the word found with CHM search feature selected as white with pure black background, then if I try to go to that word by typing it in Ctrl+F search, it covers such selection with own one which have the same style, so the selection becomes completely invisible - the word is becomes pure black on white background, the same as other text.

Such issue is not present in your dark CHM: there CHM search selection has black background + white text word, but Ctrl+F search has yellow background + black text style, so when they cover each other, I get white background with black text which on contrast with dark background of dark CHM makes such selection visible.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9848
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: CHM Help for dark mode

Post by *petermad »

2DrShark
I don't see any difference between the double search:
https://madsenworld.dk/tcmd/helpdoublesearchnormal.png
https://madsenworld.dk/tcmd/helpdoublesearchdark.png

But what I do see is a different theming of the left side content depending on whether the help is:
Started from TC's menu or with F1 in TC:
https://madsenworld.dk/tcmd/helpfromtcmenu.png

and startet by doubleclicking the totalcmd.chm file:
https://madsenworld.dk/tcmd/helpdoubleclicked.png
Do you know what setting is used for text selection color of text found using CHM search feature
It uses the color for general highlightning:

Code: Select all

[HKEY_CURRENT_USER\Control Panel\Colors]
"Highlight"=
I recommend using 0 128 255 as color - it goes with menus in most programs - some programs has fixed black text on menus, so it shouldnt be too dark.
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.10 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

petermad wrote:
2019-11-17, 16:55 UTC
I don't see any difference between the double search:
https://madsenworld.dk/tcmd/helpdoublesearchnormal.png
https://madsenworld.dk/tcmd/helpdoublesearchdark.png
...
Do you know what setting is used for text selection color of text found using CHM search feature
It uses the color for general highlightning:

Code: Select all

[HKEY_CURRENT_USER\Control Panel\Colors]
"Highlight"=
I recommend using 0 128 255 as color - it goes with menus in most programs - some programs has fixed black text on menus, so it shouldnt be too dark.
I use gray classic theme with some dark or black elements. My highlight settings:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Colors]
"Hilight"="0 0 0"
"HilightText"="255 255 255"
To reproduce the issue with Official Help file with my highlight settings, try:
1. Search in CHM for a word:
inactive
2. In search results, open the result with a page name:
Ini file Settings - Part 2
3. Scroll to the words:
InactiveTitle=-1 Inactive panel title bar color
InactiveTitleText=-1 Inactive panel title bar text color
4. With Ctrl+F on opened page, search for the same word, inactive:
a) all found words will be highlighted with yellow background+black text style except first match,
b) the first match, "Inactive" part of the text InactiveTitle=-1, will be highlighted with black background+white text style.
5. Press the button find next in Ctrl+F dialog to highlight the second match:
for the second match, "Inactive" word in "Inactive panel title bar color" text, highlight will be invisible, it will look like regular text.

If it's possible can reproduce this, and also possible to get this fixed by text style set in html pages of CHM file, maybe the fix on CHM file side will be better then changing the highlight style on my PC by me, because other TC users may have the same highlight settings as I use now.
Last edited by DrShark on 2019-11-18, 06:27 UTC, edited 1 time in total.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9848
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: CHM Help for dark mode

Post by *petermad »

for the second match, "Inactive" word in "Inactive panel title bar color" text, highlight will be invisible, it will look like regular text.
Yes the text is shown with white background and with a textcolor that is the same as the "Hilight" color from the Registry. so in your case it will be black, whereas it in my case will be blueish (0 128 255), wich is a little distinguisable.

I think the highlight color scheme is controlled by hh.exe - so there is nothing to be done, exept for the user to choose a suitable highlight color for the system.

If you are using Windows 7, there several main menus in Windows' own programs that has unredable highlighted items when using a dark highlight color, because they keep the textcolor in the menus black all the time. (Control Panel, Windows Explorer for example).
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.10 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

petermad wrote:
2019-11-17, 22:11 UTC
If you are using Windows 7, there several main menus in Windows' own programs that has unredable highlighted items when using a dark highlight color, because they keep the textcolor in the menus black all the time. (Control Panel, Windows Explorer for example).
Well, in my case they are inverted if selected, I have only this issue with double highlight in CHM. My all theme colors are under spoiler:
Spoiler
Show

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Colors]
"ActiveBorder"="160 160 164"
"ActiveTitle"="0 0 0"
"AppWorkSpace"="105 105 109"
"ButtonAlternateFace"="192 192 192"
"ButtonDkShadow"="0 0 0"
"ButtonFace"="160 160 164"
"ButtonHilight"="207 207 209"
"ButtonLight"="160 160 164"
"ButtonShadow"="105 105 109"
"ButtonText"="0 0 0"
"GradientActiveTitle"="192 192 192"
"GradientInactiveTitle"="255 255 255"
"GrayText"="105 105 109"
"Hilight"="0 0 0"
"HilightText"="255 255 255"
"HotTrackingColor"="0 0 0"
"InactiveBorder"="160 160 164"
"InactiveTitle"="105 105 109"
"InactiveTitleText"="0 0 0"
"InfoText"="0 0 0"
"InfoWindow"="255 255 255"
"Menu"="160 160 164"
"MenuText"="0 0 0"
"Scrollbar"="207 207 209"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"
"Background"="0 0 0"
"MenuHilight"="0 0 0"
"MenuBar"="255 255 255"
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39980
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: CHM Help for dark mode

Post by *ghisler(Author) »

It seems that other people have tried to do that before, but without success:
https://stackoverflow.com/questions/39151478/how-do-i-do-a-theme-css-switch-in-a-chm-and-make-it-stay
Author of Total Commander
http://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

It should be also possible to put white- and black-style pages into 1 chm file, but then TC in dark mode will have to open pages with different names and this will probably cause incompatibility with currently existing chm files on try to use them in dark mode, and the total size of chm will grow, but don't know how much - LZX compression used in CHM shouldn't make the difference too big.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

I think it's possible to add dark help support without breaking compatibility by introducing new help files naming pattern, something like totalcmd_dark.chm, totalcmd_multicolored.chm, wcmd_<lng>_dark.chm, wcmd_<lng>_multicolored.chm.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

2petermad
Can you please recompile your dark version of CHM help for TC 9.50 final?
What do you think of putting it on ghisler.com or totalcmd.net as a language/translation addon (if Christian Ghisler will give permission on this)?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9848
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: CHM Help for dark mode

Post by *petermad »

New version of "dark" help for TC 9.50 final can be downloaded here: https://madsenworld.dk/tcmd/totalcmd950darkhelp.zip
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.10 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Usher
Power Member
Power Member
Posts: 888
Joined: 2011-03-11, 10:11 UTC

Re: CHM Help for dark mode

Post by *Usher »

2petermad
It's dark help for normal mode. All the screenshots should be changed - replaced with TC screenshots in native Windows 10 dark mode, I think.
Regards from Poland
Andrzej P. Wozniak
User avatar
petermad
Power Member
Power Member
Posts: 9848
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: CHM Help for dark mode

Post by *petermad »

2Usher
It's dark help for normal mode
I know - it is just a quick fix of the background and text colors in the main panel. Since it not possible to change the background color of the items in the menu panel anyway, I am not going to invest more time in it.
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.10 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1625
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: CHM Help for dark mode

Post by *DrShark »

2petermad
Would you mind if I'll add a link to your dark help to list of unreleased plugins and addons wiki page?

2ghisler(Author)
Please consider adding a wincmd.ini parameter to set a path to help file used in dark mode (e.g. DarkModeHelp=).
If such parameter isn't set, TC will use default CHM or HLP while in dark mode, older TC versions will also use default help file so this won't break a compatibility.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

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