[solved] TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[solved] TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

Post by *petermad »

To reproduce:
1. Open TC with a clean ini file
2. Make 3 color assignments in "Define colors by file type" which are easy to tell apart (e.g. green, blue and orange), see: https://madsenworld.dk/tcmd/definecolors1.png
3. Click the "Dark <-> Normal" button and edit the dark colors so they are also easy to tell apart, see: https://madsenworld.dk/tcmd/definecolors2.png
4. Click the "Dark <-> Normal" button again to go back to Normal mode setting.
5. Place the cursor on the first item in the list.
6. Click "Add" and define a 4th color (purple), see: https://madsenworld.dk/tcmd/definecolors3.png
7. Click the "Dark <-> Normal" button again to go to Dark mode setting.
6. The new item is now placed as the second item (as expected), but the third item still has the color it had before (orange) and is now assigned to the *.blue file type, and the file type *.orange is deleted, see: https://madsenworld.dk/tcmd/definecolors4.png

Only if you place the cursor on the last item before you click the "Add" button, the added filetype is inserted correctly without messing up the already defined definitions for dark mode.

You can skip step 4. here above, so you are in Dark mode setting when adding the new item - the new item is still not inserted corretcly in Dark mode - but it is actually correctly inserted in the Normal mode setting.

If there are more than 3 types defined, then all the color definitions after the place where the new definition is added gets shifted and the last item is deleted.
Last edited by petermad on 2019-12-18, 21:31 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
tuska
Power Member
Power Member
Posts: 3758
Joined: 2007-05-21, 12:17 UTC

Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

Post by *tuska »

petermad wrote: 2019-12-14, 14:11 UTC the file type *.orange is deleted, see: https://madsenworld.dk/tcmd/definecolors4.png
No, the entry is in fourth place in your picture.
You can hardly see him because there is black writing on an almost black background.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

Post by *petermad »

You can hardly see him because there is black writing on an almost black background.
By Jove, you are right :shock: - If I click on it, it does get highlighted, and if I click "Edit" it turns out to be the the *.orange file type entry - as it should be.

So the file type entries are moved correctly down the line, but the colors are not moved with them - so the last item ends up not having a color from before adding the new item, and then TC apparantly choses to assign black to the item.
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
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

Post by *StatusQuo »

petermad wrote: 2019-12-14, 19:06 UTC So the file type entries are moved correctly down the line, but the colors are not moved with them - so the last item ends up not having a color from before adding the new item, and then TC apparantly choses to assign black to the item.
Confirmed.
Color assignment of line 2 (where the new line is inserted) is lost and set to approximately white (RGB 255/229/255).
Line 2=>3 ("blue") gets darkmode-color of former line 3 (orange)
line 3=>4 ("orange") gets darkmode-color of previously non-existing line 4 (so it's black=0).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

Post by *ghisler(Author) »

Confirmed, I didn't move the colors for dark mode down when adding a new entry.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode

Post by *petermad »

Confirmed fixed in TC 9.5b10 :-)
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
Post Reply