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

When the ScrollBar is set to Visibility::AlwaysVisible, scrolling is always possible & contains pointer #4348

Closed
wants to merge 38 commits into from

Conversation

rustbasic
Copy link
Contributor

@rustbasic rustbasic commented Apr 11, 2024

Issues :

Pull requests :

When the ScrollBar is set to Visibility::AlwaysVisible, scrolling is always possible & contains pointer

This way we can scroll wherever we want at any time.
(e.g. find string)

@@ -234,7 +234,9 @@ impl InputState {
// Mouse wheels often go very large steps.
// A single notch on a logitech mouse wheel connected to a Macbook returns 14.0 raw_scroll_delta.
// So we smooth it out over several frames for a nicer user experience when scrolling in egui.
unprocessed_scroll_delta += raw_scroll_delta;

// unprocessed_scroll_delta += raw_scroll_delta;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like a bug

Copy link
Contributor Author

@rustbasic rustbasic Apr 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like a bug

There is no problem if I remove this from Windows.
I left it here to hear 'emilk's opinion on whether it can be removed.

If something is wrong or needs to be fixed, please fix it or let me know.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment effectively ignores raw_scroll_delta and all the work that went into smoothing it, breaking the existing smooth scrolling of everything except for ScrollAreas (e.g. scroll-to-zoom in a plot).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment effectively ignores raw_scroll_delta and all the work that went into smoothing it, breaking the existing smooth scrolling of everything except for ScrollAreas (e.g. scroll-to-zoom in a plot).

Edited as #4412

@rustbasic rustbasic requested a review from emilk April 21, 2024 11:22
@rustbasic rustbasic closed this May 23, 2024
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.

scroll_with_delta doesn't work
2 participants