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 » Splitter » FIX: Drawing artefact Bar when zommed
FIX: Drawing artefact Bar when zommed [message #30289] Wed, 22 December 2010 09:28 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi, the following produces an artefact drawing of the Splitter bar, when Splitter consists of ParentCtrls it is not very nice.

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct App : public TopWindow
{
	typedef App CLASSNAME;
	ParentCtrl a, b;
	Splitter h;
	Splitter::Style sst;

	void Toggle();

	App();
};

void App::Toggle()
{
	h.Zoom(h.GetZoom() == 1 ? -1 : 1);
}

App::App()
{
	sst.vert[0] = sst.horz[0] = GUI_GlobalStyle() >= GUISTYLE_XP ? Blend(SColorHighlight, SColorFace, 64)
	                                                     : SColorShadow();
	sst.vert[1] = sst.horz[1] = GUI_GlobalStyle() >= GUISTYLE_XP ? Blend(SColorHighlight, SColorFace)
	                                                     : SColorShadow();
	h.SetStyle(sst);

	h.Horz(a, b);
	Add(h.SizePos());
	Sizeable().Zoomable();

	SetTimeCallback(3000, THISBACK(Toggle));
}


GUI_APP_MAIN
{
	App().Run();
}


the FIX is just an if in the Paint function
Splitter.cpp:73
	const Value *ch = vert ? chstyle->vert : chstyle->horz;
+	if(style<0)
	for(int i = 0; i < pos.GetCount(); i++) {
 
Read Message
Read Message
Previous Topic: Splitter: New Callback WhenEndResize
Next Topic: What happened to Splitter::BarWidth?
Goto Forum:
  


Current Time: Thu Mar 28 15:22:47 CET 2024

Total time taken to generate the page: 0.00838 seconds