[haiku-commits] Re: haiku: hrev44760 - src/kits/interface headers/os/interface src/kits

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 05 Nov 2012 15:25:57 +0100

John Scipione wrote:
> > 09d87d9: The text control is now more flexible with its layout items.
> > 
> > * Before, you had to have both, the text view layout item, and the label
> > layout item or else nothing would ever be visible.
> > * Now you can only create the text view item, and it will still work.
> > * Also, no matter the order you added the layout items, they would always
> > put the label on the left, and the control to the right.
> > * You can place the label and text view layout items anywhere now, although
> > you should keep in mind that the view spans over their frame unions; IOW
> > they should always adjacent to each other, but not necessarily horizontally
> > and left to right.
> > * No longer uses a fixed label spacing, but utilizes
> > BControlLook::DefaultLabelSpacing() instead.
> > * However, the spacing is always added to the right of the label, no matter
> > how you place it in the layout. Maybe one wants to add a 
> > SetLabelTextViewGap()
> > like method.
> 
> This seems like it could be useful for adding support for right-to-left 
> languages like Arabic and Hebrew. I was thinking that in some of my own 
> designs I've used separate labels and controls but I should replace them with 
> a combined label and control so that someday the label can be automatically 
> displayed to the right if the control for those languages.

I think one would rather have right-to-left support in the layout classes. So 
one would e.g. still add label and control to a horizontal group in that order, 
but by default the group would use the preferred language's layout direction.

BTextControl and other controls with an integrated label should really be 
reworked completely in R2. The label should have been separate in the first 
place, like it is in other GUI tool kits.

CU, Ingo

Other related posts: