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 » U++ Library support » Slider&ProgressIndicator » ProgressIndicator in ArrayCtrl
Re: ProgressIndicator in ArrayCtrl [message #12501 is a reply to message #12496] Tue, 06 November 2007 11:39 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Good bug! Smile

When drawing percentages the progress bar falls back to none-chameleon drawing style and the function GetMsz() used for returning the inner control size (minus margins) returns an incorrect value because it still uses ChMargin.

My quick fix:
Size ProgressIndicator::GetMsz()
{
	Size sz = GetSize();
	if (GUI_GlobalStyle() >= GUISTYLE_XP && !percent) {
		Rect mg = ChMargins(style->hlook);
		sz.cx -= mg.left + mg.right;
		mg = ChMargins(style->vlook);
		sz.cy -= mg.top + mg.bottom;
	}
	else {
		sz.cx -= 4;
		sz.cy -= 4;	
	}
	return sz;
}


James

[Updated on: Tue, 06 November 2007 11:40]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Please, add SetColor function to ProgressIndicator
Next Topic: Problem with ProgressIndicator in Kubuntu Linux
Goto Forum:
  


Current Time: Wed May 08 04:14:01 CEST 2024

Total time taken to generate the page: 0.02035 seconds