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 » U++ Widgets - General questions or Mixed problems » Frames dissapearing and Buttons not drawing
Frames dissapearing and Buttons not drawing [message #13865] Wed, 30 January 2008 14:45 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Hi!

I have here a test case of a bug I noticed a while ago, but I thought it was my fault. It seems it was not.

To reproduce, I created a window with a layout. I inserted a centered Picture and a FrameRight. The FrameRight contains a Button.

When you start the application, the initial size is so small, that the frame is not visible. You will have to enlarge the window horizontally to see it.

Issue #1: I don't think this is intentional, but as you see in the test case, if the window is too narrow, but still a lot wider than needed to display the frame, the frame disappears. I think it should be visible all the time. Just resize the window, and you'll see how it keeps disappearing a reappearing.

Isssue #2: Enlarge the window so that the frame appears. Then reduce it's width so that it gets very close to the limit where the frame would disappear, but not quite as much. You are basically at the limit, reducing width by 5 pixels, will cause it to disappear. Now, move your mouse over the Button from the frame. The Button will be painted completely white.
  • Attachment: test4.rar
    (Size: 0.78KB, Downloaded 213 times)
Re: Frames dissapearing and Buttons not drawing [message #13928 is a reply to message #13865] Fri, 01 February 2008 22:34 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Wed, 30 January 2008 08:45

Hi!

I have here a test case of a bug I noticed a while ago, but I thought it was my fault. It seems it was not.

To reproduce, I created a window with a layout. I inserted a centered Picture and a FrameRight. The FrameRight contains a Button.

When you start the application, the initial size is so small, that the frame is not visible. You will have to enlarge the window horizontally to see it.

Issue #1: I don't think this is intentional, but as you see in the test case, if the window is too narrow, but still a lot wider than needed to display the frame, the frame disappears. I think it should be visible all the time. Just resize the window, and you'll see how it keeps disappearing a reappearing.

Isssue #2: Enlarge the window so that the frame appears. Then reduce it's width so that it gets very close to the limit where the frame would disappear, but not quite as much. You are basically at the limit, reducing width by 5 pixels, will cause it to disappear. Now, move your mouse over the Button from the frame. The Button will be painted completely white.


Thanks, I have forgot about this case while implementing latest CtrlDraw optimization...

Fix:


Ctrl *Ctrl::FindBestOpaque(const Rect& clip)
{
	Ctrl *w = NULL;
	for(Ctrl *q = GetFirstChild(); q; q = q->GetNext()) {
		if(q->IsVisible() && GetScreenView().Contains(q->GetScreenRect())) {
			Rect sw = q->GetScreenView();
			if((q->GetOpaqueRect() + sw.TopLeft()).Contains(clip)) {
				w = q;
				Ctrl *h = q->FindBestOpaque(clip);
				if(h) w = h;
			}
			else
			if(q->GetScreenView().Contains(clip))
				w = q->FindBestOpaque(clip);
			else
			if(q->GetScreenRect().Intersects(clip))
				w = NULL;
		}
	}
	return w;
}


Mirek
Previous Topic: header not found by compiler
Next Topic: What does ScrollBar::SetPage do?
Goto Forum:
  


Current Time: Sat Apr 27 08:52:18 CEST 2024

Total time taken to generate the page: 0.03292 seconds