[interfacekit] Re: BMenuField, BTextControl, and SetDivider()
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Tue, 19 Jun 2007 22:04:44 +0200
On 2007-06-19 at 12:20:25 [+0200], Stephan Assmus <superstippi@xxxxxx> wrote:
>
> my preferred solution would be to change the design of the BMenuField such
> that it looks good to draw the "dark border" of the frame with the focus
> color. I am not a great fan of how the BMenuField currently draws itself. It
> involves many "hacks". But for the time being, the focus indication could
> also be drawn like on a BButton (underlining the (menu item) label).
>
> And I should add that I have code in my apps to allign BMenuFields and
> BTextControls so that they get different values for the divider in order to
> compensate for the visual "offset" in the BMenuFields. And I go as far as
> using different offsets for ZETA, where the visual offset is yet a different
> one. So let's please fix BMenuField to work as intuitively expected at least
> in Haiku.
>
> Many apps use control->StringWidth(control->Label()), sometimes adding some
> value for padding, but that doesn't really give the control much chance to
> figure this out itself. Like for example extra padding needed by BMenuFields
> to draw the focus frame, so something like virtual float
> BControl::LabelWidth() would be handy, but it is less an issue with the new
> layout framework, where a custom BLayoutItem can be used by the control to
> represent the label. This can add any padding needed to the minimum width.
>
> I am attaching my latest mockup again. You can see that the frames of each
> control are drawn very similarily, so that the visual alignment is easy to
> achieve, and the focus is easily indicated and would work the same for both
> BTextControls and BMenuFields...
OK, I guess, I'll simply continue adding the missing layout functionality and
leave fixing the graphical issues to others.
CU, Ingo
- References:
- [interfacekit] BMenuField, BTextControl, and SetDivider()
- From: Ingo Weinhold
- [interfacekit] Re: BMenuField, BTextControl, and SetDivider()
- From: Stephan Assmus
Other related posts:
- » [interfacekit] BMenuField, BTextControl, and SetDivider()
- » [interfacekit] Re: BMenuField, BTextControl, and SetDivider()
- » [interfacekit] Re: BMenuField, BTextControl, and SetDivider()
- [interfacekit] BMenuField, BTextControl, and SetDivider()
- From: Ingo Weinhold
- [interfacekit] Re: BMenuField, BTextControl, and SetDivider()
- From: Stephan Assmus