Skip to content

Conversation

@CiiLu
Copy link
Contributor

@CiiLu CiiLu commented Jan 24, 2026

@CiiLu CiiLu changed the title Fix: JFXTabPane 指示器偏移 Fix#4763 : JFXTabPane 指示器偏移 Jan 24, 2026
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 fixes a tab indicator offset issue in JFXTabPane by introducing a corrected implementation of the JFXTabPaneSkin class. The change addresses issue #4763 related to tab indicator positioning.

Changes:

  • Complete implementation of JFXTabPaneSkin class with tab selection animation and indicator positioning logic
  • Addition of header container, tab content holders, and scroll controls for tab navigation
  • Implementation of Material Design styling for tab panes with ripple effects

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

final double oldWidth = snapSizeX(lineWidth * oldScaleX);
final double oldTransX = snapPositionX(selectedTabLine.getTranslateX());

final double newScaleX = newWidth / lineWidth;
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The variable offsetStart is used but never defined or initialized in the runTimeline method or as a class field in HeaderContainer. This will cause a compilation error. If this should reference header.scrollOffset or another offset value, it needs to be properly defined.

Suggested change
final double newScaleX = newWidth / lineWidth;
final double newScaleX = newWidth / lineWidth;
final double offsetStart = 0.0;

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Glavo Glavo merged commit d956c04 into HMCL-dev:main Jan 27, 2026
2 checks passed
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.

[Bug] 账户添加界面 Tab Bar 衬线位置不正确

2 participants