Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors multiple UI components to standardize “toggle-icon4” icon-button creation by switching from manual JFXButton setup to FXUtils.newToggleButton4(...), and adds a sized overload to support custom icon sizes.
Changes:
- Replace repeated
new JFXButton()+getStyleClass().add("toggle-icon4")+setGraphic(...)withFXUtils.newToggleButton4(SVG[, size])across various pages/cells/skins. - Add
FXUtils.newToggleButton4(SVG icon, int size)overload to support explicit icon sizing. - Remove now-unneeded per-call boilerplate (style class + graphic assignment) where the helper is used.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldListPage.java | Use helper for quick-play launch and “more” icon buttons. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldInfoPage.java | Use sized helper for edit/reset icon buttons in world icon controls. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldBackupsPage.java | Use helper for reveal/delete backup action buttons. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java | Use helper for reveal/delete actions in schematic list cell. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ResourcepackListPage.java | Initialize reveal/delete buttons via helper and remove redundant setup. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java | Use helper for restore/info/reveal buttons in mod list cells. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameListCell.java | Use helper for update/test-launch/manage icon buttons. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/profile/ProfileListItemSkin.java | Use sized helper for the remove/close icon button. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/main/SettingsPage.java | Use sized helper for update button in settings UI. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/main/PersonalizationPage.java | Use helper for reset/restore buttons in personalization controls. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/main/JavaRestorePage.java | Use helper for reveal/remove/restore controls for disabled Java items. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/main/JavaManagementPage.java | Use helper for reveal button in Java runtime list cell. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/ImagePickerItem.java | Use sized helper for edit/reset icon buttons. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/AdvancedListItem.java | Remove direct JFXButton construction/import; create right-action button via helper. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/account/CreateAccountPane.java | Use sized helper for “add server” icon button. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListItemSkin.java | Use helper for refresh/upload/copy UUID/remove buttons and remove redundant setup. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/InstallerItem.java | Use helper for the remove/close icon button in installer item UI. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/FXUtils.java | Add newToggleButton4(SVG, int) overload; keep existing default-size helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java
Outdated
Show resolved
Hide resolved
…kin.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Glavo
approved these changes
Feb 25, 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.
No description provided.