[haiku-commits] Re: haiku: hrev45809 - src/kits/interface

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 1 Jul 2013 21:36:32 -0400

On 7/1/13, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> The issue isn't just about alignment. Checkboxes are often used in
> vertical layouts with other controls -- like text fields -- that may
> actually benefit from being wider.  If you restrict the checkbox's
> maximum width, that also restricts the maximum width of the vertical
> group it assigned to. So one ends up either overriding the maximum width
> explicitly or wrapping the checkbox in a horizontal group with a glue item.

Perhaps I'm missing something there: the text control still sets
unlimited width by default, so wouldn't it still cause the previous
behavior to take effect if it's in such a group? For the latter a
default of unlimited width at least makes sense though, since it can
use the extra width to enlarge the text field portion ; a checkbox
gains nothing except empty space that counterintuitively causes a
click to invoke it.

> Back to your question: When restricting the checkbox's width by default,
> setting the default horizontal alignment to B_ALIGN_LEFT (or
> B_ALIGN_RIGHT for right-to-left languages) seems a reasonable option.
> B_ALIGN_USE_FULL_WIDTH would work as well.

Just for clarification, exactly how does B_ALIGN_USE_FULL_WIDTH work?
I must admit I don't fully understand the semantics of that one.

Regards,

Rene

Other related posts: