Skip to content

feat: 移动并简化 VersionPage.wrap 方法#5218

Merged
Glavo merged 3 commits into
HMCL-dev:mainfrom
Mine-diamond:warp
Jan 15, 2026
Merged

feat: 移动并简化 VersionPage.wrap 方法#5218
Glavo merged 3 commits into
HMCL-dev:mainfrom
Mine-diamond:warp

Conversation

@Mine-diamond
Copy link
Copy Markdown
Contributor

@Mine-diamond Mine-diamond commented Jan 13, 2026

VersionPage类中的wrap方法被五湖四海的类调用,结果VersionPage自己却没有调用wrap方法,此PR将其放到了FXUtil类中

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/FXUtils.java Outdated
Copy link
Copy Markdown
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 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 wrap methods from VersionPage to FXUtils, simplifying the implementation to use the existing limitingSize method
  • Updated all references across 5 files to call FXUtils.wrap instead of VersionPage.wrap
  • Removed unused imports from VersionPage and 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 Glavo changed the title feat: 移动并简化warp方法 feat: 移动并简化 VersionPage.wrap 方法 Jan 15, 2026
@Glavo Glavo merged commit 83782f5 into HMCL-dev:main Jan 15, 2026
8 checks passed
@Mine-diamond Mine-diamond deleted the warp branch February 5, 2026 14:20
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.

3 participants