[haiku-commits] Re: haiku: hrev45636 - src/kits/interface headers

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Tue, 7 May 2013 15:30:30 -0400

On Tue, May 7, 2013 at 2:54 PM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
> That makes perfect sense, indeed. I guess the layout aware BMenuBar will not
> try to resize itself, but just sets a new preferred size, and invalidates
> the layout?

Now, maybe Ingo (according to git blame) can chime in here and provide
an explanation. It looks like the layout aware BMenuBar constructor
calls a non-layout version of BMenu with an empty BRect() parameter.
I'm guessing this is so that a BMenuBar doesn't act like a layout
aware BMenu.

It looks like the magic happens in BMenu::_UpdateWindowViewSize()
which gets called on AttachedToWindow() and AddItem() at least.

Other related posts: