Skip to content

Fix scroll wheel issue.#149

Open
Dockter wants to merge 1 commit intoOrdinastie:1.12from
AlmuraDev:1.12
Open

Fix scroll wheel issue.#149
Dockter wants to merge 1 commit intoOrdinastie:1.12from
AlmuraDev:1.12

Conversation

@Dockter
Copy link
Copy Markdown

@Dockter Dockter commented May 31, 2018

Signed-off-by: Dockter dockter@almuramc.com

Signed-off-by: Dockter <dockter@almuramc.com>
@Niko-sk2x
Copy link
Copy Markdown

Niko-sk2x 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