Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Too large gaps between top menu items with utf-8 text [FIXED]
Too large gaps between top menu items with utf-8 text [FIXED] [message #722] |
Fri, 27 January 2006 20:40 |
zsolt
Messages: 698 Registered: December 2005 Location: Budapest, Hungary
|
Contributor |
|
|
This problem exists on submenu items also, but they grow too wide.
The items are growing proportionally with the number of non ascii characters in utf-8 text.
The problem is that calling GetTextSize() using a String calculates its size as it was in some non-unicode encoding. So the correct argument should be a WString object.
I have fixed this modifying MenuBar.cpp in two places:
In MenuItem::GetMinSize() method:
Size sz1 = ScreenInfo().GetTextSize(text.ToWString(), font);
and in TopSubMenuItem::GetMinSize() method:
return AddFrameSize(ScreenInfo().GetTextSize(text.ToWString(), font) + Size(12, 7));
Maybe this is not a correct fix because I don't how GetTextSize() should be working on String objects.
[Updated on: Sun, 30 April 2006 17:22] by Moderator Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Jun 05 21:15:39 CEST 2024
Total time taken to generate the page: 0.02187 seconds
|