[haiku-development] Re: Layout problems

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 31 Mar 2009 20:14:45 +0200

On 2009-03-31 at 20:03:06 [+0200], Sean Healy <jalopeura@xxxxxxxxxxx> wrote:
> Stephan Assmus wrote:
> 
> > Before I look at the rest of the code more closely, you are mixing old 
> > style and layout style when you create a GroupView() with the rect 
> > parameter.
> 
> I thought that only applied to the child controls; that parent controls 
> could still be laid out manually in their own containing control (the 
> "grandparent"), but that child controls needed to be all or none with 
> regards to layout.
> 
> Basically, if there's more than one group, each GroupView is put into a 
> TabView (a custom class also defined in the file in question), and that 
> TabView is returned to the caller (i.e., the Media preflet). Otherwise, 
> just the single GroupView is returned. But the GroupViews are not 
> themselves controlled or resized by the layout system.

Yes, I think I have used such a setup in the Appearance preflet before. 
Thing is though, you've certainly used mostly no layout-aware child views 
from the code you posted. These need to have the B_SUPPORTS_LAYOUT flag, 
basically, they should all be created via the BView(const char* name, 
uint32 flags) constructor. See my other mail. BTW, thanks a lot for working 
on this! Although the Media Preflet itself should also be changed to use 
layouting in the end. Right now, there are some alignment problems, which 
would be even more visible than the parameter views, IMHO.

Best regards,
-Stephan



Other related posts: