[TC 11.00b4] incorrect drawing of menu items when changing an option

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

[TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

So again it's about a new menu/dialog with folder histories and commonly used directories.
This list should be filled with more than 30 entries, for both sections.
Perhaps some exact number does not play a role here.
The main thing is that there are more of them than the specified number in the 'Maximum items to show' option

By default, the 'Show all entries' item in the context menu of this dialog is disabled.
So turn it on now and move the mouse over this list - and you will see how the dialog/menu starts
redrawing of all elements. The separator of these two lists/sections may end up being drawn twice,
or not be rendered at all.

I'm also not entirely sure - it's hard to read the twitching lines on the screen, but it seems that when I turn on
all elements - I still do not see ALL elements in this redrawn menu. Because if I count these records from my
ini file - I have more than 80 of them, but on the screen when I count them, I get a floating number for some reason,
but always less than 50. I count 47, then 49, then 50 - but this is the maximum ...
#146217 personal license
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

TC 11.00b5 - bug is still here, but for 100% of reproducibility we have to get the situation when this new dialog=menu will show the scrollbar on its right side - because too much items should be shown on it.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

Sorry, I do not understand your report. Did you try to limit the number of entries shown in
Configuration - Options - History?
There you can choose to view e.g. 20 history entries and 15 from the most recently used list.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

Did you try to limit
No.
Simply walk through as many dirs as you can - in order to fill and get the loooooong (in height) hot-dirs list with many items inside it.
And what exactly you did not understand in next paragraph?
By default, the 'Show all entries' item in the context menu of this menu/dialog/list is turned off.
So turn it on now (press Alt+Shift+Down) and move the mouse cursor over this list - and you will see how the dialog/menu starts
redrawing of all its elements right below the cursor position. For example the separator of these two lists/sections
may end up being drawn twice, or not be rendered at all.
You will see that the names change to other values ​​only after the mouse cursor is hovered over them.
Those in theory, this list should have been automatically ENTIRELY redrawn, taking into account the increased number of entries in it (this is the essence of the logic of the option we enabled, right?) and the scrollbar should have changed its internal size, because the number of elements to display/scroll has changed in the list - there are more of them than before. BUT none of this happens until we start to crawl over this list with the mouse cursor.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

I cannot reproduce any kind of drawing error after switching to show all elements. Maybe it it depends on Windows version, theme, or TC version 32-bit or 64-bit?
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

Win10 x64, standard theme. TC both bitness.

But probably you missed one note! Initial list of hot-dirs ALREADY - before showing all elements - must be veeeery long - with scrollbar already!
On initially short lists when for example we see 10 items and after turning on "Show all entries" - we will see 30 items - this bug definitely will not reproduce. Because in this case the whole form of this list is DEFINITELY will be redrawing in its entirety. So no - we talk here about the cases when this list is SO BIG - that 'Show all entries' option will only affect on scrollbar internal sizes only!
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

Thanks, that helped, I can reproduce it now, by
1. setting the max. width so small that the width of the list doesn't change when switching to all entries, AND
2. when there is a vertical scrollbar in both cases.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

This should be fixed in beta 6, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

Yes, in fact, everything seems to be rendered correctly now. BUT! one moment remains. When I select this menu item and the context menu closes, and the histories menu is redrawn taking into account the display of all entries, changing the size of itself and adding scrolling area if necessary - the cursor does not move anywhere all the time (I simply do not have time for this - and this is good). BUT! at the same time, the nearest entry in the menu, which is under it - is not auto-highlighted! I.e. I need to literally move the cursor by half a millimeter to make this entry light up. It is logical to assume that I should not do so - it should highlight itself)))
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

I'm currently moving the cursor to the beginning when switching this option (show all entries) on or off. Why? Because the entry the cursor was on is often not in both lists.

When you move the cursor, the current item follows the mouse move, and is therefore placed on the item under the mouse cursor.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

2ghisler(Author)
Don't you think that in the testimony of a witness)) something does not converge?
I wrote that my cursor does NOT move anywhere and therefore the menu item under it is NOT automatically highlighted.
And you suddenly write that you MOVE the cursor to provide the desired selection. BUT it doesn't exist! I don't see it - no movement, no auto selection.
Once again = I'm talking about the mouse cursor! It is the main target of my description from above!
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

I just explained your remark:
I need to literally move the cursor by half a millimeter
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

I just explained your remark:
I still don't get it - did you able to replicate this behavior? Do you agree that I describe the CURRENT behavior as erroneous?
Last edited by AntonyD on 2023-06-09, 08:34 UTC, edited 1 time in total.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *ghisler(Author) »

Sorry but I don't have a solution here. It's not clear where the caret should go after choosing "Show all entries", so it's not moved. Once you move the mouse a bit, it's immediately shown below the mouse cursor.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00b4] incorrect drawing of menu items when changing an option

Post by *AntonyD »

2ghisler(Author)
why we operate with word "caret"? We talk only about the mouse cursor. It should nor be matter - did I move it a little bit after choosing "Show all entries" item in menu - or not. Mouse Cursor was here and it will be here. So In any fraction of seconds the code of Total should be easily to define - over which element of the "just a few nanoseconds earlier rendered" menu it is. So all is simple - highlight exactly that item which is under the mouse cursor. Do not wait until i will move it for a Nano millimeter, because all the same - it will be the menu item over which the mouse cursor is hovering will be highlighted. No other elements will be involved.
#146217 personal license
Post Reply