Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
zsolt is currently offline  zsolt
Messages: 697
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

Re: Too large gaps between top menu items with utf-8 text [message #724 is a reply to message #722] Sat, 28 January 2006 11:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Fixed by fixing Draw::GetTextSize to work correctly with UTF-8 texts.
Re: Too large gaps between top menu items with utf-8 text [message #727 is a reply to message #724] Sat, 28 January 2006 11:28 Go to previous message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
Thank you!

[Updated on: Sat, 28 January 2006 11:28]

Report message to a moderator

Previous Topic: editors problems: tabs, capitalization... [FIXED]
Next Topic: upp602 beta [BUGS][FIXED]
Goto Forum:
  


Current Time: Sun Apr 28 04:55:00 CEST 2024

Total time taken to generate the page: 0.04333 seconds