Skip to content

Feat: Animate menu button arrow counter-clockwise on popup display#6344

Merged
Glavo merged 5 commits into
HMCL-dev:mainfrom
KSSJW-Contribution:launch-pane-menu-button-feat
Jul 10, 2026
Merged

Feat: Animate menu button arrow counter-clockwise on popup display#6344
Glavo merged 5 commits into
HMCL-dev:mainfrom
KSSJW-Contribution:launch-pane-menu-button-feat

Conversation

@KSSJW

@KSSJW KSSJW commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

为启动面板的菜单按钮图标添加了旋转动画

特性

  • 能够与关闭动画设置适配。

实况

_20260709_022537.mp4

@KSSJW

KSSJW commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an animated rotation effect for the version switch menu button's arrow icon when the game list popup is opened and closed. To support this, a new showAndGetPopup method was added to GameListPopupMenu to return the popup instance. The review feedback suggests using FXUtils.playAnimation to prevent animation conflicts on the arrow graphic when rapidly toggling the menu, and refactoring the existing show method in GameListPopupMenu to delegate to the new showAndGetPopup method to avoid code duplication.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/main/MainPage.java Outdated
@KSSJW

KSSJW commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a rotation animation for the version switch menu button when its popup is shown and hidden, refactoring GameListPopupMenu to return the popup instance. The review feedback suggests removing redundant arm() and disarm() calls on the button inside the action handler, and respecting user animation preferences by checking if animations are enabled before playing the transitions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/main/MainPage.java
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/main/MainPage.java
@KSSJW

KSSJW commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a rotation animation for the version switch button's icon when its popup menu is opened and closed. To support this, GameListPopupMenu was refactored to return the popup instance via a new showAndGetPopup method. The review feedback suggests adding a defensive null check on menuButton.getGraphic() to prevent potential NullPointerExceptions, and optimizing the code when animations are disabled by directly calling Node.setRotate() instead of instantiating a RotateTransition.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/main/MainPage.java

@KSSJW KSSJW left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed

@KSSJW
KSSJW marked this pull request as ready for review July 8, 2026 19:03
@Glavo
Glavo merged commit 98af2c8 into HMCL-dev:main Jul 10, 2026
2 checks passed
@KSSJW
KSSJW deleted the launch-pane-menu-button-feat branch July 11, 2026 04:58
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.

2 participants