[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 16:52:04 -0400

On Tue, May 7, 2013 at 4:20 PM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> On 05/07/2013 09:30 PM, John Scipione wrote:
> I really don't recall what my exact motivation was for using a specific
> constructor 6 years ago. As it seems BMenu didn't -- and still doesn't --
> have a layout aware constructor. So using the protected constructor that
> allows passing view flags (and thus B_SUPPORTS_LAYOUT) seems to be the
> obvious choice.

Hey, no big deal, and I didn't mean to single you out, there have been
more than a few cooks in this kitchen. Let's just leave it at menu
magic.

Looking at the code again you're right, there is no Layout aware BMenu
constructor, I was fooled by the lack of a frame parameter, but, it
seems BMenu has always been that way. Is there a good reason why BMenu
can't be constructed from a frame-less layout aware View?

Oh and _UpdateWindowViewSize() is definitely NOT where the magic
happens, I read the code again and that method only works on
non-BMenuBar menus.

Other related posts: