Merge lp://qastaging/~haggai-eran/nux/rtl-rebased into lp://qastaging/nux
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~haggai-eran/nux/rtl-rebased |
Merge into: | lp://qastaging/nux |
Diff against target: |
701 lines (+229/-89) (has conflicts) 7 files modified
Nux/Area.cpp (+11/-0) Nux/Area.h (+16/-0) Nux/HLayout.cpp (+152/-89) Nux/Layout.cpp (+16/-0) Nux/Layout.h (+3/-0) Nux/Nux.cpp (+28/-0) Nux/Nux.h (+3/-0) Text conflict in Nux/HLayout.cpp Text conflict in Nux/Nux.cpp |
To merge this branch: | bzr merge lp://qastaging/~haggai-eran/nux/rtl-rebased |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Francis Ginther | Abstain | ||
Jay Taoko | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2011-11-14.
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?