Skip to content
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: ScrollArea repeatedly appears and disappears quickly issue. #4658

Closed
wants to merge 7 commits into from

Conversation

rustbasic
Copy link
Contributor

@rustbasic rustbasic commented Jun 14, 2024

If the mouse is at a specific position above the ScrollArea (in TextEdit?), the ScrollArea repeatedly appears and disappears quickly.
You can more easily find the issue if you set Full bar width to the maximum value of 32.

If there is a better way to fix this than the solution in this Pull Request, please revise it accordingly.

@emilk
Copy link
Owner

emilk commented Jun 23, 2024

Please give a repro of the problem so I can test this

@rustbasic
Copy link
Contributor Author

rustbasic commented Jun 23, 2024

Please give a repro of the problem so I can test this

It is difficult to capture, so I will explain how to reproduce it instead.

To make it easier to reproduce the bug,
Open settings_ui in egui_demo_app, go to Spacing -> Scroll Area -> Details,
Select Floating,
And set Full bar width to 32.

To easily reproduce the bug, open a window containing a ScrollArea and repeatedly hover your mouse pointer over the ScrollArea.


The bug could be happening when the mouse cursor is exactly on the boundary of the ScrollArea or when a specific condition is met.

This PR also has the advantage of making the ScrollArea easier to select.

@emilk
Copy link
Owner

emilk commented Jun 24, 2024

I fail to reproduce any problem. Do you have a video of it?

@rustbasic
Copy link
Contributor Author

rustbasic commented Jun 25, 2024

I fail to reproduce any problem. Do you have a video of it?

https://github.com/rustbasic/rustbasic/blob/main/egui%20demo%20app%202024-06-25%2017-26-02.mp4
( I am uploading this because it exceeds the 10MB limit. I can't even edit videos. )

When I go to the font book from the 2/3rd point of the video to the end, the 'Scroll Bar' keeps appearing and disappearing, but in the video, it appears to be blurry due to a save fps issue.

Regardless of the specific conditions, the same symptom appears in all Scroll Bars.

You can tell because it blinks once every few dozen times.
If you want to keep blinking, you have to stop the mouse right away when it blinks, so it will keep blinking, so you have to do it hundreds of times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants