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 scroll wheel issue. #149

Open
wants to merge 1 commit into
base: 1.12
Choose a base branch
from
Open

Fix scroll wheel issue. #149

wants to merge 1 commit into from

Conversation

Dockter
Copy link

@Dockter Dockter commented May 31, 2018

Signed-off-by: Dockter [email protected]

@Barteks2x
Copy link

Barteks2x commented May 31, 2018

The real issue is that the effective scroll step as seen by user depends on the content size. In my code I'm overriding scroll step to be:

    @Override
    public float getScrollStep() {
        float contentSize = getContentHeight() - getHeight();
        float scrollStep = super.getScrollStep() * 1000;
        float scrollFraction = scrollStep / contentSize;
        if (Float.isFinite(scrollFraction) && scrollFraction > 0) {
            return scrollFraction;
        }
        return 0;
    }

So this change will actually break my code (actually, it doesn't work with latest version anyway. But it's still not a backwards compatible change)

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