[interfacekit] Re: BBox::GetPreferredSize()
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Fri, 08 Jun 2007 16:16:42 +0200
On 2007-06-08 at 15:19:51 [+0200], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
wrote:
> Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote:
[...]
> > * The "account for border" part is a riddle to me. Where is the
> > padding
> > coming from? And why does it differ depending on whether there's a
> > label or
> > not?
>
> If you ask me, it doesn't make much sense - only that it has a
> different border width depending on the type. With a label, it might
> look better with more padding, though.
Yeah, a little padding might look good, but it helps little to add it in
GetPreferredSize() only and ignore it in all other places, i.e. in
SetLabel(), InnerFrame(), Draw(). I've no problem with adding special
spacing depending on whatever possible combination of label and border, I
just need to understand in which cases and where to add it.
> Anyway, the computations don't look correct to me at all.
>
> Feel free to correct that to your likings, I would think. IMO
> GetPreferredSize() in a BBox is as useful as in BView, at least when
> there is no label.
I find the idea of the "NOTE" not unreasonable, but then one has to
consequently implement it that way. The result can't carry both
information, the width to add to the child width and the minimum width
induced by the label.
BTW, as I'm implementing it, when in B_SUPPORTS_LAYOUT mode the BBox will
care for only one child (besides the optional label view). I considered
adding support for setting insets on the box, but I suppose the child will
be some kind of group view and thus support insets itself, anyway.
CU, Ingo
PS: I wonder whether the other BBox authors are on this list. DarkWyrm?
Stippi?
- References:
- [interfacekit] Re: BBox::GetPreferredSize()
- From: Axel Dörfler
Other related posts:
- » [interfacekit] BBox::GetPreferredSize()
- » [interfacekit] Re: BBox::GetPreferredSize()
- » [interfacekit] Re: BBox::GetPreferredSize()
- [interfacekit] Re: BBox::GetPreferredSize()
- From: Axel Dörfler