-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
#5077 After update, more and more Wrap are added every time the mouse is moved. #5084
Comments
My.egui.App.2024-09-09.22-19-59.mp4
|
Someone, please refer to #5093 and fix the bug correctly by referring to this part. |
This issue has been resolved in #5106 |
This seems to only happen when |
Yes, it seems so. |
…k#5161) * Closes emilk#5106 * Closes emilk#5084 Protect against rounding errors in egui layout code. Say the user asks to wrap at width 200.0. The text layout wraps, and reports that the final width was 196.0 points. This than trickles up the `Ui` chain and gets stored as the width for a tooltip (say). On the next frame, this is then set as the max width for the tooltip, and we end up calling the text layout code again, this time with a wrap width of 196.0. Except, somewhere in the `Ui` chain with added margins etc, a rounding error was introduced, so that we actually set a wrap-width of 195.9997 instead. Now the text that fit perfectly at 196.0 needs to wrap one word earlier, and so the text re-wraps and reports a new width of 185.0 points. And then the cycle continues. So this PR limits the text wrap-width to be an integer. Related issues: * emilk#4927 * emilk#4928 * emilk#5163 --- Pleas test this @rustbasic
#5076 #5077 After update (May be #5077),
wrap(line breaks) are happening more and more strangely.
In case of
on_hover_text_at_pointer()
, more and more Wrap(line breaks) are added every time the mouse is moved.The text was updated successfully, but these errors were encountered: