[interfacekit] BBox::GetPreferredSize()
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: Interface Kit <interfacekit@xxxxxxxxxxxxx>
- Date: Fri, 08 Jun 2007 04:42:14 +0200
Howdy,
can anyone explain BBox::GetPreferredSize() to me, please. There are a few
things about it, that I find odd:
* The "NOTE" near the end of the function is obviously incorrect. It
doesn't make any sense to add the child's width to a value that includes
the width of the label.
* In case of a label string, the label placement and spacing is not taken
into account. The computation of the label box rect in SetLabel() explains
that the label is place at x = 10 and has 4 pixels of horizontal spacing to
either side.
* 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?
CU, Ingo
PS: I'm currently working on the file, so please don't change anything.
Just tell me.
- Follow-Ups:
- [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