Skip to content

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Jan 6, 2026

似乎 JavaFX 在低速滚动内容的情况下会有比较明显的文字抖动情况。这个问题我们很难解决,不过通过让平滑滚动更早截止应该会略微改善显示效果。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the cutoff speed threshold for smooth scrolling animations to reduce text jitter at low scroll speeds in JavaFX. The change increases the cutoff threshold by 10x, causing smooth scrolling animations to terminate earlier when the scroll delta becomes small.

  • Introduces a named constant CUTOFF_DELTA to replace magic number 0.001
  • Increases the cutoff threshold from 0.001 to 0.01 to make animations stop earlier
  • Applies the change consistently across both ScrollPane and VirtualFlow smooth scrolling implementations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Glavo Glavo merged commit 4ad3685 into HMCL-dev:main Jan 6, 2026
8 checks passed
@Glavo Glavo deleted the scroll branch January 6, 2026 14:15
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