egui/crates/egui_extras/src
MStarha f2ce6424f3
`ScrollArea` improvements for user configurability (#5443)
* Closes <https://github.com/emilk/egui/issues/5406>
* [x] I have followed the instructions in the PR template

The changes follow what is described in the issue with a couple changes:
- Scroll bars are not hidden when dragging is disabled, for that
`ScrollArea::scroll_bar_visibility()` has to be used, this is as not to
limit the user configurability by imposing a specific function. The user
might want to retain the scrollbars visibility to show the current
position.
- The input for mouse wheel scrolling is unchanged. When I inspected the
code initially I made a mistake in recognizing the source of scrolling.
Current implementation is in fact using
`InputState::smooth_scroll_delta` and not `PassState::scroll_delta`,
therefore it is possible to prevent scrolling by setting the
`InputState::smooth_scroll_delta` to zero before painting the
`ScrollArea`.

A simple demo is available at
https://github.com/MStarha/egui_scroll_area_test
2025-04-25 11:01:22 +02:00
..
datepicker Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
loaders Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
image.rs Support SVG Text Rendering in egui_extras (#5979) 2025-04-14 11:13:17 +02:00
layout.rs Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
lib.rs Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
loaders.rs Animated WebP support (#5470) 2024-12-29 11:46:08 +01:00
sizing.rs Add assert messages and print bad argument values in asserts (#5216) 2025-03-25 09:20:29 +01:00
strip.rs Fix some clippy issues found by 1.84.0 (#5603) 2025-01-13 08:29:13 +01:00
syntax_highlighting.rs Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
table.rs `ScrollArea` improvements for user configurability (#5443) 2025-04-25 11:01:22 +02:00