-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix right-to-left layout direction issues #12181
Conversation
standardize LTRStaticBoxSizer usage standardize LTRStaticBoxSizer usage test wx RTL workaround use wxWidgets workaround commit c59e874 Author: buddsean <[email protected]> Date: Tue Mar 16 14:09:26 2021 +1100 try parent instead of sibling method commit 11017de Author: buddsean <[email protected]> Date: Tue Mar 16 13:25:59 2021 +1100 remove LTRStaticBoxSizer workaround commit e17de62 Author: buddsean <[email protected]> Date: Tue Mar 16 13:14:39 2021 +1100 try parent instead of sibling method commit 45514f2 Author: buddsean <[email protected]> Date: Tue Mar 16 11:48:24 2021 +1100 try parent instead of sibling method commit 9575740 Author: buddsean <[email protected]> Date: Tue Mar 16 11:23:59 2021 +1100 try parent instead of sibling method commit 608fb66 Author: buddsean <[email protected]> Date: Mon Mar 15 14:38:37 2021 +1100 test wx RTL workaround commit f1189bf Author: buddsean <[email protected]> Date: Mon Mar 15 14:03:20 2021 +1100 test wx RTL workaround
See test results for failed build of commit de830fa79b |
See test results for failed build of commit e773d661f1 |
Why can't it just be checked by changing NVDA language to an RTL language? |
Hi @CyrilleB79, Currently this issue #638, but I think it's worth fixing in this PR just to make testing this easier. I think a major factor blocking #638 was the GUI issues fixed in this PR. Going to investigate a fix for this and hopefully close out both tickets. |
See test results for failed build of commit d668aae5e6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the changes entry for #638 I think it would be good to mention Right to Left languages.
Overall this looks good. Testing this myself I noticed that the right side of the static box outline is missing where there are labels or controls. It's still an improvement, but it might be worth mentioning this is known in the change log.
See test results for failed build of commit bd9f0f3e61 |
See test results for failed build of commit 6a62962912 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a reminder in my previous review I mentioned some considerations for the change log entries, happy for you to go ahead and merge.
Hi @seanbudd You have merged this branch in master, but you did not select "Squash merge", which is the usual way to do in NVDA project. This result in many commits just for this PR in the commit history of master. It seems it was not intended. |
I see what has happened. @CyrilleB79 it was actually squash merged, but the commit message includes the details of all the commits. I suspect @seanbudd used the |
Ah no @feerrenrut , I did not see the convention that was used in commit messages, is it the changelog? I have just been using the default in previous squash merges. Thanks @CyrilleB79 for raising this |
In #12181, the setting "Report formatting changes after the cursor" in "Document Formatting" was incorrectly moved to the wrong parent, the static box grouping above it, making it invisible to the user. It was readable using NVDA but not graphically visible to the user. This has been corrected.
Navigating through settings using tabbing does not visually scroll to the focused control. wxPython ScrolledPanels calculate the position to scroll to based on the relative position to a focus elements parent, rather than the relative position to the ScrolledPanel itself. When fixing right-to-left issues in #12181, another layer of nesting was introduced for controls in our settings panels, which caused the controls to no longer get scrolled to. A patched version of ScrolledPanel is created, which calculates relative position to the ScrolledPanel
Link to issue number:
Closes #8859, #638
Summary of the issue:
#8859
Right to left layouts caused several GUI elements to not render, or not render correctly.
A ticket was raised on wxWidgets, where support was removed for the behaviour we were using, and a work around was suggested.
Adding controls to the
wx.StaticBoxSizer
by adding them to the same parent causes undefined behaviour, specifically with Right-To-Left layouts. wxWidgets now requires that these items be added as children.#638
wxWidgets did not respect the layout out of language when setting the language via NVDA as opposed through the system/Windows. This means languages with a right-to-left layout would render left-to-right unless the system locale also used a right-to-left layout
Description of how this pull request fixes the issue:
#8859
The suggested and implemented workaround is as follows:
Before:
After:
#638
The layout for the
wx.App
main frame is manually set usingwx.Locale
information.Testing strategy:
Visually compare GUI features outlined in #8859 between an LTR language such as English and an RTL language such as Farsi.
Known issues with pull request:
Some GUI features still display differently for right-to-left languages
Change log entry:
Bug fixes
Code Review Checklist: