Set Horizontal Alignment for Textfields
Previously, when a Textfield instance changed its text direction, no change was made to its horizontal alignment. Now, ChangeTextDirectionAndLayoutAlignment() calls SetHorizontalAlignment() with the correct alignment based on text direction. Text direction Horizontal alignment Right-to-left -> Aligned right Left-to-right -> Aligned left This fixes a bug where toggling RTL in a Textfield did not change the text writing direction. A unit test was also added to test ChangeTextDirectionAndLayoutAlignment(). This test checks that a call to the method properly updates the textfield's text direction and horizontal alignment. Bug: 841123 Change-Id: I8dadc1272a3474dc72ae9470bdc7d9949e8fd854 Reviewed-on: https://chromium-review.googlesource.com/1060626 Commit-Queue: Tessa Nijssen <tnijssen@google.com> Reviewed-by:Peter Kasting <pkasting@chromium.org> Reviewed-by:
Sarah Chan <spqchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#559397}
Showing
Please register or sign in to comment