emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
20.61k stars 1.49k forks source link

Fix: ScrollArea repeatedly appears and disappears quickly issue. + For scroll_with_delta() + inner_margin #4681

Closed rustbasic closed 5 days ago

rustbasic commented 1 week ago

Fix: ScrollArea repeatedly appears and disappears quickly issue. (#4658)

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.

AND

Fix: scroll_with_delta() for ScrollArea::vertical() and ScrollArea::horizontal()

We need to do this in order for ScrollArea::vertical() and ScrollArea::horizontal() to work even where they are divided or nested.

AND

inner_margin also applies to floating scroll.

emilk commented 5 days ago

Don't open multiple PRs with the same functionality. You have three options: