-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Cursor location changes with Normal/Small font selection #223
Comments
Positions are adjusted based on where the reading region is pointing to, prior to considering the actual position of the cursor. If only the cursor position were used, and you went through a long script making changes, and then back to the start to start prompting, the moment the Normal font size was restored, the viewport's position would jump all the way back to near the bottom of the script to where the text cursor remained placed, and the user would have to scroll a long distance to where they were a moment ago. The solution I came up with is that when sizes are toggled, the cursor position is set to the beginning of the line the reading region points to. Nevertheless, this repositioning intentionally doesn't happen when going from small to normal when the position of the text cursor is within the line the reading region is pointing to, which allows us to return to our previous line in the case of the button for toggling between font sizes being toggled multiple times one after the other. In other words, this was a small compromise and a design choice made to prevent QPrompt from becoming frustrating to users. Having said that, there might be room for improvement here. It might be possible to compare against the area visible inside the viewport and not just the position of the reading region, then only use the reading region if the cursor is outside of the visible area... I'll leave this open for now, to do experiments later. |
Details copied from #245: Bug Description Steps to Reproduce
Expected behavior Device information
|
Bug Description
When changing from Normal to Small fonts or back, the current cursor location changes.
Steps to Reproduce
Expected behavior
Cursor location should remain next to the same text.
Screenshots (optional)
Device information
The text was updated successfully, but these errors were encountered: