Skip to content

Smooth scrolling improvements#870

Open
decce6 wants to merge 3 commits into
ACGaming:mainfrom
decce6:smooth-scrolling-improvement
Open

Smooth scrolling improvements#870
decce6 wants to merge 3 commits into
ACGaming:mainfrom
decce6:smooth-scrolling-improvement

Conversation

@decce6

@decce6 decce6 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

This PR:

  • bumps RetroFuturaGradle to 1.4.9. The original version, 1.4.0, no longer exists on the GTNH maven, making it impossible to build the mod.
  • fixes the issue where, when the content height becomes smaller, the scrolling position would become negative, creating a visual artifact [0]
  • fixes the issue where, if the user clicks the left mouse button while the scroll position is negative, the position jumps to zero instead of properly stopping at the current point [1]
Before After
[0] Scroll1_WO Scroll1_W
[1] Scroll2_WO Scroll2_W

@what-the-diff

what-the-diff Bot commented Jun 19, 2026

Copy link
Copy Markdown

PR Summary

  • Enhanced Software Efficiency:
    The plugin com.gtnewhorizons.retrofuturagradle used in the software build process has been updated to its latest version 1.4.9. This means our software will stay updated, efficient, and compatible with the latest changes or requirements.

  • Improved Scrolling Functionality:

    • The scrolling limit's application logic has been adjusted to better balance users' scroll inputs. Restrictions on the lower limit of scrolling have been removed, meaning users can scroll freely without encountering unexpected stops.
    • An updated scrolling behavior has been implemented wherein no scrolling is processed when the mouse is pressed, this reduces chances of accidental scrolls when users are interacting with the screen.
    • Adjustments have been made to ensure that the maximum scrolling calculation never returns a negative value, enhancing user experience by preventing issues associated with negative scrolling limits.
  • Enhanced Mouse Scrolling Control:

    • The logic controlling the lower scrolling limit has been modified to remove any constraints, similar to the changes in the scrolling functionality mentioned above. This further improves user experience by providing seamless control over scrolling.
    • The mouse scrolling behavior has been updated to process scrolling only when the mouse isn't pressed. This change syncs with the improvements made in the scrolling functionality, offering users smoother and more controlled navigation through the application's screen.

@what-the-diff

what-the-diff Bot commented Jun 19, 2026

Copy link
Copy Markdown

PR Summary

  • Gradle Plugin Version Upgrade
    The version of the 'retrofuturagradle' plugin (that is part of Gradle, a key tool for automating our software building process) has been updated. By moving from the old version (1.4.0) to the new one (1.4.9), we expect to take advantage of any new features, bug fixes or performance improvements that have been included in this updated version.

  • Improved Scrolling Mechanism

    • The logic used to manage scrolling in our application has been changed - now, 'scrollDistance' doesn't change while the user is clicking the mouse. This is expected to enhance the user's experience by providing smoother and more predictable scrolling behavior.

    • We've also simplified the method which gets the maximum scroll limit, by using the mathematical function Math.max.

  • Adjusted Scrolling Related Functions

    • Similar adjustments have been applied to the related functions that handle mouse inputs during scrolling interaction. This revamp should result in a more seamless and consistent scrolling experience for the user.

    • A fix was made to ensure that amountScrolled (which informs how far a user has scrolled) is now limited by getMaxScroll() (which informs us about maximum possible scrolling) rather than the total height of the content being scrolled. This should help to prevent any unexpected scrolling behavior.

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.

1 participant