-
Notifications
You must be signed in to change notification settings - Fork 818
Fix#4763 : JFXTabPane 指示器偏移 #5308
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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; |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
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.
| final double newScaleX = newWidth / lineWidth; | |
| final double newScaleX = newWidth / lineWidth; | |
| final double offsetStart = 0.0; |
| } else if ("GRAPHIC".equals(p)) { | ||
| tabText.setGraphic(tab.getGraphic()); | ||
| } else if ("TOOLTIP".equals(p)) { | ||
| // install new Toolip/ uninstall the old one |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'Toolip' to 'Tooltip'.
| // install new Toolip/ uninstall the old one | |
| // install new Tooltip / uninstall the old one |
Resolves #4763


https://github.com/sshahine/JFoenix/blob/master/jfoenix/src/main/java/com/jfoenix/skins/JFXTabPaneSkin.java