Merge lp://qastaging/~haggai-eran/nux/rtl-rebased into lp://qastaging/nux/2.0
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~haggai-eran/nux/rtl-rebased |
Merge into: | lp://qastaging/nux/2.0 |
Diff against target: |
678 lines (+207/-97) 7 files modified
Nux/Area.cpp (+11/-0) Nux/Area.h (+16/-0) Nux/HLayout.cpp (+146/-97) Nux/Layout.cpp (+16/-0) Nux/Layout.h (+3/-0) Nux/Nux.cpp (+12/-0) Nux/Nux.h (+3/-0) |
To merge this branch: | bzr merge lp://qastaging/~haggai-eran/nux/rtl-rebased |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Taoko | Pending | ||
Review via email: mp+82225@code.qastaging.launchpad.net |
This proposal has been superseded by a proposal from 2012-04-27.
Commit message
Add right-to-left mirroring support. Implement mirroring for HLayout.
Description of the change
Hi,
Here's my branch rebased against trunk. I hope the changes are more clear now.
There's still a problem with this patch to HLayout, though. When in right-to-left state, it packs child elements to the layout starting from the last on the list, instead of starting from the first, in order to get them in reverse order. However, it seems that for some of the widgets this doesn't work very well. I checked the CheckBox example, and the AbstractChecked
Should I change my patch to pack the children in their logical order, starting from the rightmost edge, or should I leave the code as it is, and try to fix uses like the AbstractChecked
Regards,
Haggai
Unmerged revisions
- 521. By Haggai Eran
-
Change LayoutContentDi
stribution only when in RTL mode. - 520. By Haggai Eran
-
More HLayout changes toward right-to-left support.
- 519. By Haggai Eran
-
Add right-to-left mirroring support. Implement mirroring for HLayout.
Haggai
Selecting right to left has to be done per layout. Lets say you have an horizontal layout that has a checkbox followed by a button, and the button is followed by a combobox. In LTR order you get this:
checkbox | button | combobox
If you make the HLayout to be RTL then the content will look like this:
combobox| button | checkbox
This should work out fine because only a specific HLayout has been been changed to RTL.
So you have to select only the layouts of the interface that need to be inverted. Rather than having SetDefaultDirection in Nux.cpp, it should be a function member of LinearLayout. Then for each layout (HLayout or VLayout), you will be able to decide if it goes from LTR or RTL. Individual views like the Checkbox, will remain un-affected.
How about that?