[haiku-commits] Re: haiku: hrev49614 - src/apps/mail

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 10 Sep 2015 21:51:50 +0200

On 10.09.2015 20:36, Axel Dörfler wrote:

On 09/10/2015 07:54 PM, John Scipione wrote:
On Fri, Sep 4, 2015 at 8:36 AM, <axeld@xxxxxxxxxxxxxxxx> wrote:
e047b40a2fd1: Interface Kit: use different spacing constants.
- B_USE_DEFAULT_SPACING = -2,
[...]
+ B_USE_DEFAULT_SPACING = -1002,
I’m afraid that -1002 is not large enough in magnitude. I could
imagine that someone might want to inset a box by more than 1002px so
this doesn’t go far enough.

I can imagine a lot of things, but unless you can come up with a real
use case, I'd say we're good to go.

As long as we aren’t really concerned
about backwards compatibility here and can use any constants, can we
use something like MIN_INT + x instead?

We're using float here, and the accuracy towards the end of the int
spectrum is limited. Of course we could use larger values, but I really
don't see the point; if -1002 isn't enough, -100000 isn't either.

Well, a difference is that the former is easily within the range of today's monitor resolutions while the latter will probably never be reached.

That being said, as I wrote earlier, I think the whole feature is pretty superfluous as its only known use case is cutting border pixels off scroll bars/views, which could have been addressed by a more specific solution. For other cases one could write a trivial layout.

CU, Ingo


Other related posts: