feat: 移动并简化 VersionPage.wrap 方法#5218
Merged
Merged
Conversation
Glavo
reviewed
Jan 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the wrap methods by moving them from VersionPage to FXUtils. The PR correctly notes that these methods were being called by various classes throughout the codebase, but VersionPage itself never used them, making FXUtils a more appropriate home for these utility methods.
Changes:
- Moved two
wrapmethods fromVersionPagetoFXUtils, simplifying the implementation to use the existinglimitingSizemethod - Updated all references across 5 files to call
FXUtils.wrapinstead ofVersionPage.wrap - Removed unused imports from
VersionPageand files that previously imported it
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| VersionPage.java | Removed the wrap(Node) and wrap(SVG) methods and their associated unused imports (Insets, Pos, StackPane) |
| FXUtils.java | Added simplified wrap(Node) and wrap(SVG) methods that leverage the existing limitingSize utility |
| GameListPage.java | Updated call to use FXUtils.wrap instead of VersionPage.wrap |
| ProfileListItemSkin.java | Updated call to use FXUtils.wrap and removed unnecessary VersionPage import |
| RootPage.java | Changed static import from VersionPage.wrap to FXUtils.wrap |
| AdvancedListBox.java | Updated call to use FXUtils.wrap and removed unnecessary VersionPage import |
| AccountListPage.java | Changed static import from VersionPage.wrap to FXUtils.wrap |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Glavo
approved these changes
Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VersionPage类中的wrap方法被五湖四海的类调用,结果VersionPage自己却没有调用wrap方法,此PR将其放到了FXUtil类中