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 next message
kohait00 is currently offline  kohait00
Messages: 936
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++) {
Re: FIX: Drawing artefact Bar when zommed [message #30355 is a reply to message #30289] Sun, 26 December 2010 09:10 Go to previous message
mirek is currently offline  mirek
Messages: 13311
Registered: November 2005
Ultimate Member
Makes sense, thanks, applied.

Mirek
Previous Topic: Splitter: New Callback WhenEndResize
Next Topic: What happened to Splitter::BarWidth?
Goto Forum:
  


Current Time: Wed May 12 07:01:35 CEST 2021

Total time taken to generate the page: 0.02985 seconds