[haiku-commits] Re: r43176 - haiku/trunk/src/preferences/screen

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 4 Nov 2011 16:19:38 -0400

On Fri, Nov 4, 2011 at 3:28 PM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:

> Axel introduced the method in r16335 [1]. I only adjusted it to layout
> management in r21356 -- I don't think I changed its semantics back then. My
> commit message also suggests that it has actually become superfluous with
> layout management.
>
> CU, Ingo
>
> [1] http://dev.haiku-os.org/changeset/16335
> [2] http://dev.haiku-os.org/changeset/21356


That explanation jives with what svn blame is telling me. Since you rewrote
the method in r21356 it is now your method so you get to tell me what it is
supposed to do. :) Although TopBorderOffset() is not made superfluous by
the Layout API because it is still needed to add spacing to line up the top
of two BBox's when one has a control and the other doesn't even when using
the Layout API like in the case of the Screen Preferences app.

So the question becomes, does BMenu::PreferredSize() return the sum of the
heights of the child views or the height of 1 MenuItem? If it is the former
than we have an oversight in TopBorderOffset() here. This would be really
apparent if there were 100 items in the menu instead of 2.

John Scipione

Other related posts: