Skip to content

feat(scroll): change scroll dt to_pixels#24731

Merged
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
nuts-rice:scrollwheel_to_pixel
Jul 9, 2026
Merged

feat(scroll): change scroll dt to_pixels#24731
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
nuts-rice:scrollwheel_to_pixel

Conversation

@nuts-rice

@nuts-rice nuts-rice commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Objective

Fixes #24610

Solution

-current scroll conversion ratio after to_lines() was yielding 1px per notch for mousewheel scroll delta. It was converting scroll dt to line values then applying them to scroll_pos.y- which could be pixels instead.
-So I changed to to_pixels(). This applied to scroll dt yields 100px per notch .

Testing

-cargo run --example scroll is visually snappier. I'd be happy to provide comparison demo gifs if y'all want.
-Could tweak notch speed via MouseScrollPixelsPerLine


@kfc35 kfc35 added D-Trivial Nice and easy! A great choice to get started with Bevy A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 24, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Jun 24, 2026

@kfc35 kfc35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This makes sense to me since scroll_pos is in logical pixels as you mentioned

I tested this using a mac trackpad and scrolling still seems fine.

@kfc35 kfc35 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 27, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jul 8, 2026
Merged via the queue into bevyengine:main with commit bc25f3f Jul 9, 2026
47 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in UI Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Listview scrollwheel scrolling is very slow

3 participants