[haiku-development] Re: Possible layout bug

  • From: Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 22 Oct 2011 10:43:08 +0200

Il giorno 21/ott/2011 21.43, "Alex Wilson" <yourpalal2@xxxxxxxxx> ha
scritto:
>
> I don't think this is a bug. I suspect the problem is this:
> 1) BStringView sets its min/max size to be just big enough to
> accommodate the string it displays (IIRC)
> 2) BGroupLayout basically echoes the stringview's min/max constraints
> to its parent layout.
> 3) Removing BStringView means the BGroupLayout is empty, and can
> stretch out to any size. (Which is why this fixes your problem.)

Indeed, setting an explicit max size for the BStringView to B_UNLIMITED_SIZE
makes the problem disappear. I find this a little weird, though, but maybe
just because there is a BMenuBar involved. Maybe there should be some
default setting for BMenuBars which makes them stick to the top
window/parent border?

Other related posts: