GIANT history menu! it covered half the screen for me!

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: GIANT history menu! it covered half the screen for me!

Post by *ghisler(Author) »

Try increasing the minimum path length to at least 60.

Regarding the gap, I had big troubles finding a good metric for that. Some fonts have tiny space characters and very wide "W" and "M", and others are fixed fonts where all characters have the same width. Currently I'm using the icon width for all the gaps. Maybe you have a better idea.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: GIANT history menu! it covered half the screen for me!

Post by *AntonyD »

half of icon's width - will be enough;)
And IF suddenly the minimum path length in chars MUST be at least 60 - maybe we should introduce an internal checks for that input,
so user simply could not enter less than 60?
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: GIANT history menu! it covered half the screen for me!

Post by *ghisler(Author) »

half of icon's width - will be enough;)
OK, I will try that.

I didn't say that it must be at least 60, but it seems that DrawText with the "path ellipsis" flag misbehaves when the available space is too narrow.
But I found a solution now! I call DrawText with DT_PATH_ELLIPSIS, DT_CALCRECT and DT_MODIFYSTRING.
If the returned rectangle is wider, then I call with the modified string and DT_END_ELLIPSIS. This way it never goes beyond the available space.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: GIANT history menu! it covered half the screen for me!

Post by *AntonyD »

Half the width of the icon, as I thought - it turned out to be very enough! Looks great!
And it seems that the problem with the end-letters - which are covered with some kind of "grey-void" at the end of "almost-almost" suitable-sized strings is also solved, imho. I no longer found such rendering in the places where I had seen it before.

Looks like bug is finally fixed now totally.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: GIANT history menu! it covered half the screen for me!

Post by *ghisler(Author) »

Thanks!

Moderator message

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply