TC 9.50b1 (dark mode): ColorFilterNNColorDark

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *HolgerK »

The color filter is kind of broken in dark mode.
Starting with an fresh ini (darkmode turned off) and creating a color filter (in this case green as color) an entry is created with

Code: Select all

ColorFilter1=*.green
ColorFilter1Color=65280
ColorFilter1ColorDark=-2,65280
but switching to dark mode -> the color for a *.green file is nearly the same as any other file.

Using the UI to change the color again while dark mode is active shows that red, blue and green values are set to zero.

Changing the color back to green (255) show a correct preview inside "define colors by file type" but does not change anything in the file panel.
After this the Entry ini-file looks like this:

Code: Select all

]ColorFilter1=*.green
ColorFilter1Color=65280
ColorFilter1ColorDark=65280,65280
Manually directly editing the ini-file (by removing the second parameter of ColorFilter1ColorDark) finally brings the correct color into the file panel.

Code: Select all

ColorFilter1=*.green
ColorFilter1Color=65280
ColorFilter1ColorDark=65280
This looks like the order of the two parameters is somehow reversed between writing/reading inside the configuration dialog compared to reading for the file panel.

Regards
Holger
Make our planet great again
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *ghisler(Author) »

You are right, I will correct it in beta 2.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *petermad »

This does still not work in TC 9.5b2 !

When changing the colors for filetypes they are still saved with double color codes like:

Code: Select all

ColorFilter2Color=16711808
ColorFilter2ColorDark=16730698,16711808
where the second code obviously is the color in Normal Mode.

It does not work in the file panels until I manually delete the second color code, so it looks like:

Code: Select all

ColorFilter2Color=16711808
ColorFilter2ColorDark=16730698
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *ghisler(Author) »

Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *HolgerK »

I can confirm the fix and also the remaining problem from
TC 9.50b2 (dark mode): ColorFilterNNColorDark wrote:...when the text behind ColorFilter6ColorDark= is longer than 15 characters...
using a color filter like:

Code: Select all

ColorFilter3=*.blue
ColorFilter3Color=16711680
ColorFilter3ColorDark=16711680,16711680
I will then retest with b3 again.
Btw: what is the meaning of the "-2" in "ColorFilter1ColorDark=-2,65280"?
undefined in opposite to "-1": use default?

Regards
Holger
Make our planet great again
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *petermad »

Seems to be fixed in TC 9.5b3 :-)
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *HolgerK »

HolgerK wrote: 2019-10-22, 19:59 UTC
TC 9.50b2 (dark mode): ColorFilterNNColorDark wrote:...when the text behind ColorFilter6ColorDark= is longer than 15 characters...
using a color filter like:

Code: Select all

ColorFilter3=*.blue
ColorFilter3Color=16711680
ColorFilter3ColorDark=16711680,16711680
I will then retest with b3 again.
Btw: what is the meaning of the "-2" in "ColorFilter1ColorDark=-2,65280"?
undefined in opposite to "-1": use default?
The problem with the >15 characters is fixed in TC9.50 x64/x86 b3

Still the question why in non dark mode configured filter colors do get an "ColorFilterNNColorDark=-2,<non-dark-mode-color>" as default.
After switching to dark mode this "-2" triggers several steps for the user:
a) First he has to notice that all ColorFilterColors a more or less white (in panel and preview).
b) going to the steps of redefining the colors the windows color dialog shows a R=0, G=0, B=0 value.

Wouldn't it be better to set the color in dark mode to the same value as in non dark mode (the case that ColorFilterNNColorDark wasn't set before)
If this color is too dark for dark mode it could be easily set by the user to a brighter value using the slider at the right side of the windows color selection dialog.

I've to say that I am still uncomfortable with this current behavior (a lot of clicking in dialog's, with the need to remember the previously selected color tone). Especially because my panel colors were already dark in TC9.22a, and switching to dark mode (mainly because the dialog and menu colors) just has the consequence that i have to select each color from scratch again.

Currently my workaround is just to edit the wincmd.ini directly:
- Copy&Paste&Modify the ColorFilterNNColor to ColorFilterNNColorDark
- Copy all other colors to the [ColorsDark] section

Regards
Holger
Make our planet great again
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *petermad »

Wouldn't it be better to set the color in dark mode to the same value as in non dark mode (the case that ColorFilterNNColorDark wasn't set before)
If this color is too dark for dark mode it could be easily set by the user to a brighter value using the slider at the right side of the windows color selection dialog.
I think this is a good idea, especially since the algoritm that TC use to set the colors automatically results in colors that are predominantly very close to white.
Last edited by petermad on 2019-11-04, 16:44 UTC, edited 1 time in total.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *ghisler(Author) »

I agree, I will set the auto-converted color when creating a new color filter, but let the user change the individual dark or light color when changing an existing filter.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *HolgerK »

I would consider this as fixed now with TC9.50 b4.
Much better behavior than before.
:-)

Summary:

- If i start with a fresh ini file and create a color filter in normal mode, TC stores this as:
ColorFilter1=*.red
ColorFilter1Color=255
(Windows-ColorDialog:) R=255, G=0, B=0; H=0, S=240, L=120
(mention there is no ColorFilter1ColorDark created in this case)

- Switching to dark mode and editing this filter I see
(Windows-ColorDialog:) R:255, G:229, B:229; H=0, S=240, L=228
(adapting the color is only done by adapting the luminosity)

- as long as i do not change the color in dark mode (by e.g. decreasing the luminosity again) ColorFilter1ColorDark is not stored into the ini file.

- changing the luminosity to 120 than creates an additional entry:
ColorFilter1ColorDark=255,255
- back to normal mode and changing the color filter to (Windows-ColorDialog:) R=253, G=0, B=0
creates the following:
ColorFilter1=*.red
ColorFilter1Color=253
ColorFilter1ColorDark=255,253
Seems like the second parameter of ColorFilter1ColorDark is coupled with the first parameter of ColorFilter1Color.

Is this second value of ColorFilter<N>ColorDark really needed?

Regards
Holger
Make our planet great again
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 9.50b1 (dark mode): ColorFilterNNColorDark

Post by *ghisler(Author) »

Is this second value of ColorFilter<N>ColorDark really needed?
Yes, the first value is the color for dark mode, and the second is the color for normal mode. This is needed so TC can detect when a user changes the colors (e.g. sorts them) with an older version of Total Commander. If the value of ColorFilter1Color and the second value of ColorFilter1ColorDark are different, then TC ignores ColorFilter1ColorDark and creates an equivalent dark color by itself.
Author of Total Commander
https://www.ghisler.com
Post Reply